Public Expert As Byte
Private Sub CommandButton1_Click()
Dim NF, dl&
NF = Array("CC", "LH", "GT", "DA")
With Sheets(NF(Expert))
dl = .Cells(Rows.Count, "D").End(xlUp).Row + 1
'MsgBox dl ' pour test
.Cells(dl, "A") = TextBox1
.Cells(dl, "B") = TextBox2
.Cells(dl, "C") = TextBox3 & " " & TextBox4
.Cells(dl, "D") = NF(Expert)
.Cells(dl, "E") = ComboBox1.Value
.Cells(dl, "F") = IIf(CheckBox1, 1, vbNullString)
.Cells(dl, "G") = IIf(CheckBox2, 1, vbNullString)
.Cells(dl, "H") = IIf(CheckBox3, 1, vbNullString)
.Cells(dl, "I") = IIf(CheckBox5, 1, vbNullString)
.Cells(dl, "J") = IIf(CheckBox4, 1, vbNullString)
.Cells(dl, "K") = IIf(CheckBox6, 1, vbNullString)
.Cells(dl, "L") = ComboBox2.Value
End With
End Sub
Private Sub OptionButton1_Click()
Expert = 0
End Sub
Private Sub OptionButton2_Click()
Expert = 1
End Sub
Private Sub OptionButton3_Click()
Expert = 2
End Sub
Private Sub OptionButton4_Click()
Expert = 3
End Sub