1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| Set tabZones = CreateObject("Scripting.dictionary") 'Mémoriser les zones pour ne pas afficher 2 fois les mêmes
'Parcourir tous les items de groupes sélectionnés
indice = 1
For i = 0 To ListBox3.ListCount - 1
If ListBox3.Selected(i) Then
'Si le groupe est sélectionné, parcourir tout le tableau pour afficher les zones de ce groupe
For ind = 1 To dimTabGroupes
If tabGroupes(1, ind) = ListBox3.List(i, 0) Then
If Not tabZones.exists(tabGroupes(2, ind)) Then
tabZones.Add tabGroupes(2, ind), tabGroupes(2, ind)
End If
End If
Next ind
End If
Next i
'Afficher les zones
For Each key In tabZones
ListBox2.AddItem (tabZones(key))
Next key
Set tabZones = Nothing |
Partager