Private Sub CommandButton1_Click()
Dim plage As Range, i As Variant
Set plage = Range(ComboBox1.RowSource)
i = ComboBox1.ListIndex + 1
If i = 0 Then MsgBox "Le nom n'est pas valide...": ComboBox1.DropDown: Exit Sub
If Not IsDate(TextBox2) Then MsgBox "La date n'est pas valide...": TextBox2.SetFocus: Exit Sub
plage(i, 2) = CDate(TextBox2)
plage(i, 3) = TextBox3
With Sheets("Feuil2")
i = Application.Match(ComboBox1, .[A:A], 0)
If IsNumeric(i) Then
If .Cells(i, 2) < CDate(TextBox2) Then
.Cells(i, 2) = CDate(TextBox2)
.Cells(i, 3) = TextBox3
Exit Sub
End If
End If
i = .Range("A65536").End(xlUp)(2).Row '1ère ligne vide
.Cells(i, 1) = ComboBox1
.Cells(i, 2) = CDate(TextBox2)
.Cells(i, 3) = TextBox3
If Application.CountA(.[A1:C1]) = 0 Then .[A1:C1].Delete xlUp
End With
End Sub