Private Sub UserForm_Initialize()
ComboBox1.List = Application.Transpose([toto])
End Sub
Sub Bouton1_QuandClic()
' remplissage du combobox et affichage de l'usf
UserForm1.ComboBox6.RowSource = "B2:B" & [B65000].End(xlUp).Row
UserForm1.ComboBox6.SetFocus
UserForm1.Show
End Sub
Private Sub ComboBox6_Change()
LI1 = ComboBox6.ListIndex + 2
TextBox1 = Sheets("MARCHE DD").Cells(LI1, 2)
If ComboBox6.ListIndex = -1 Then TextBox1 = "":
UserForm1.ComboBox6.RowSource = "AF2:AF" & [AF65000].End(xlUp).Row
Exit Sub
End Sub
, donc moi je comprends plage de cellules nomméeliste nommée
Private Sub UserForm_Initialize()
Sheets(1).Range("A1:A5").Formula = "=row()"
Sheets(1).Range("A1:A5").Name = "toto"
ComboBox1.List = Application.Transpose([toto])
End Sub
Private Sub UserForm_Initialize()
'adapter la référence à la feuille en conséquence*
'ici il s'agit de la feuille 1
Sheets(1).Range("AF2:AF" & Sheets(1).[AF65000].End(xlUp).Row).Name = "toto"
ComboBox6.List = Application.Transpose([toto])
End Sub