Bonsoir,
Un exemple avec la lettre A :
Code à mettre dans le code de l'UserForm :
Option Explicit
Private Sub ComboBox1_DropButtonClick()
Dim It
For Each It In LesNoms.Items
If Left(It, 1) = "A" Then Me.ComboBox1.AddItem It
Next It
End Sub
Private Sub UserForm_Initialize()
Dim Cel As Range
Set LesNoms = CreateObject("Scripting.Dictionary")
With Sheets("Feuil1")
For Each Cel In .Range("A1:A" & .Cells(Rows.Count, 1).End(xlUp).Row)
LesNoms(Cel.Value) = Cel.Value
Next Cel
End With
End Sub
et dans le code du module1, tu rajoutes la déclaration "Public", comme ceci :
Option Explicit
Public LesNoms As Object
Sub Bouton1_QuandClic()
UserForm1.Show 0
End Sub
Bon Courage