Private Sub UserForm_Initialize()
With Sheets("Feuil1")
ComboBox1.List = .Range("D1", .Range("D65536").End(xlUp)).Value
End With
End Sub
Private Sub CommandButton1_Click()
If ComboBox1.Value <> "" Then
If IsError(Application.Match(ComboBox1.Value, ComboBox1.List, 0)) Then
If MsgBox("Attention, ajout ?", vbYesNo) = vbYes Then
Sheets("Feuil1").Range("D65536").End(xlUp)(2).Value = ComboBox1.Value
ComboBox1.AddItem ComboBox1.Value
With Sheets("Feuil1").Range("D1", Range("D65536").End(xlUp))
.Sort key1:=Sheets("Feuil1").Range("D1")
End With
End If
End If
End If
End Sub