papapaul
XLDnaute Impliqué
J'alimente ma listebox2 avec une sélection de ma listbox1.
J’ai les macros à dispo si vous-voulez : (peut-être pas top mais je découvre)
Mon problème, c’est que j’arrive pas à éviter les doublons dans ma listbox2.
Si quelqu’un peut m’aider. (avec une msgbox en plus ce serait top)
Je voulais coller ici l'image de mon useform, c'est loupé
Comment on fait?
Private Sub ListBox1_Click()
Dim i As Integer
Dim tmp As Integer
Dim myarray() As Variant
With ListBox1
For i = 0 To .ListCount - 1
If .Selected(i) = True Then
ReDim Preserve myarray(tmp)
myarray(tmp) = ListBox1.List(i)
tmp = tmp + 1
End If
Next
End With
For i = 0 To UBound(myarray)
Worksheets(myarray).Select
Next
For Each k In Worksheets(myarray)
ListBox2.AddItem k.Name
Next
End Sub
Merci à tous.