1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Dim Waitt As Boolean
Private Sub ComboBox2_Change()
If Waitt Then Exit Sub
MsgBox "coucou"
End Sub
Private Sub UserForm_Initialize()
Dim Cell1 As Range
'Supprime les données existantes dans le ComboBox
Me.ComboBox2.Clear
d = 0
'Boucle sur les cellules de la plage L2:L9232 pour
'alimenter le ComboBox
For Each Cell1 In Worksheets("Feuil1").Range("a2:a75")
Waitt = True
Me.ComboBox2 = Cell1
'remplissage sans doublon
If Me.ComboBox2.ListIndex = -1 Then _
Me.ComboBox2.AddItem Cell1
Next Cell1
Me.ComboBox2 = ""
Waitt = false
End Sub |