Private Sub CommandButton1_Click() 'bouton Ajouter
Dim DL As Long
If ONGLET.ListIndex = -1 Then ONGLET.SetFocus: Exit Sub
If TextBox8 = "" Then TextBox8.SetFocus: Exit Sub
With Sheets(ONGLET.Text)
DL = .Cells(.Rows.Count, "A").End(xlUp).Row + 1 'première ligne vide de la colonne A (colonne à adapter)
.Cells(DL, "A") = TextBox8
.Cells(DL, "B") = TextBox1
If IsDate(TextBox2) Then .Cells(DL, "C") = CDate(TextBox2)
.Cells(DL, "E") = TextBox14
If IsDate(TextBox5) Then .Cells(DL, "F") = CDate(TextBox5)
If IsDate(TextBox6) Then .Cells(DL, "G") = CDate(TextBox6)
.Cells(DL, "H") = TextBox7
End With
Unload Me
End Sub