Private Sub B_Enregistrer_Click()
Dim COL() As Variant, i As Integer
If Me.TextBox1 <> "" Then
LigneEnreg = Me.Enreg + 5
With ComboBox1.Value
COL = Array(7, 8, 9, 10, 11)
For i = 1 To 5
Cells(LigneEnreg, COL(i - 1)) = IIf(Me.Controls("CheckBox" & i), "OUI", "NON")
Next
End With
f.Cells(LigneEnreg, 1) = Me.TextBox1
f.Cells(LigneEnreg, 2) = Me.TextBox2
f.Cells(LigneEnreg, 3) = Me.TextBox3
f.Cells(LigneEnreg, 4) = Me.TextBox4
f.Cells(LigneEnreg, 5) = Me.TextBox5
If ActiveWorkbook.CodeName <> "Feuil3" Or ActiveWorkbook.CodeName <> "Feuil5" Or ActiveWorkbook.CodeName <> "Feuil18" Then f.Cells(LigneEnreg, 6) = Me.TextBox6
f.Cells(LigneEnreg, 12) = Me.TextBox7
UserForm_Initialize
End If
End Sub