Private Sub CommandButton1_Click() ' Bouton Ajouter
Dim c As Control
For Each c In UserForm1.Controls
Select Case TypeName(c)
Case "TextBox", "ComboBox"
If Len(c.Value) = 0 Then
c.Enabled = True
c.BackColor = RGB(255, 0, 0)
MsgBox "Merci de completer les zones manquantes!"
c.SetFocus
Exit Sub
End If
End Select
Next c
MsgBox "Votre saisie est maintenant complète"
Ligne = Sheets("FSEx 2014").Range("a65500").End(xlUp).Row + 1
Sheets("FSEx 2014").Cells(Ligne, 1) = ComboBox1.Value
Sheets("FSEx 2014").Cells(Ligne, 2) = ComboBox6.Value
Sheets("FSEx 2014").Cells(Ligne, 3) = ComboBox2.Value
Sheets("FSEx 2014").Cells(Ligne, 8) = ComboBox3.Value
Sheets("FSEx 2014").Cells(Ligne, 6) = ComboBox4.Value
Sheets("FSEx 2014").Cells(Ligne, 7) = ComboBox5.Value
Sheets("FSEx 2014").Cells(Ligne, 4) = intitulétextbox.Value
Sheets("FSEx 2014").Cells(Ligne, 5) = statuttextbox.Value
Sheets("FSEx 2014").Cells(Ligne, 9) = TextBox1.Value
Sheets("FSEx 2014").Cells(Ligne, 12) = TextBox2.Value
ComboBox6 = ""
ComboBox2 = ""
ComboBox3 = ""
ComboBox4 = ""
ComboBox5 = ""
intitulétextbox = ""
statuttextbox = ""
TextBox1 = ""
TextBox2 = ""
'TextBox3 = ""
UserForm1.ComboBox1.Value = ""
UserForm1.CommandButton1.Visible = False
UserForm1.ComboBox1.RowSource = "A2:A" & [A65000].End(xlUp).Row
Unload UserForm1
End Sub