Bonsoir le forum
est il possible de réaliser une boucle sur ce code pour des listbox nommées de 1 à 10 ,listbox1,listbox2 ....listbox10 :
Private Sub UserForm_Initialize()
Dim cell As Variant
Dim i As Byte
for i = 1 to 10
For Each cell In Worksheets('tabpoule').Range('ae10:ae14')
If cell <> '' Then Me.ListBox1.AddItem cell
Next
next i
End sub
un essai du genre :
If cell <> '' Then 'Me.ListBox'& i.AddItem cell
Ne marche pas .
merci
est il possible de réaliser une boucle sur ce code pour des listbox nommées de 1 à 10 ,listbox1,listbox2 ....listbox10 :
Private Sub UserForm_Initialize()
Dim cell As Variant
Dim i As Byte
for i = 1 to 10
For Each cell In Worksheets('tabpoule').Range('ae10:ae14')
If cell <> '' Then Me.ListBox1.AddItem cell
Next
next i
End sub
un essai du genre :
If cell <> '' Then 'Me.ListBox'& i.AddItem cell
Ne marche pas .
merci