1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| Private Sub ListBox2_Click()
If ListBox2.ListIndex = -1 Then Exit Sub
ListBox3.Clear
With Sheets("feuil2")
For Each c In Range(.[A1], .[A65000].End(xlUp)).SpecialCells(xlVisible)
If OptionButton1 = True Then
If c.Offset(0, 2) = ListBox2 Then ListBox3.AddItem c
Else
If c.Offset(0, 1) = ListBox2 Then ListBox3.AddItem c
End If
Next c
End With
End Sub
Sub IniLbx1()
Clear2
Set MonDico = CreateObject("Scripting.Dictionary")
With Sheets("feuil2")
.AutoFilterMode = False
For Each c In Range(.[B2], .[B65000].End(xlUp))
If Not MonDico.Exists(c.Value) And c.Value <> "" Then MonDico.Add c.Value, c.Value
Next c
End With
Temp = MonDico.items
Call Tri(Temp, LBound(Temp), UBound(Temp))
ListBox1.List = Temp
Set MonDico = Nothing
End Sub |
Partager