Bonjour,
J'ai deux combobox alimenter avec ce code
Private Sub listecbb5()
Set f = Sheets("Pano")
Set MonDico = CreateObject("Scripting.Dictionary")
a = f.Range("A7:A" & f.[A65000].End(xlUp).Row) ' tableau a(n,1) pour rapidité
For I = LBound(a) To UBound(a)
If a(I, 1) <> "" Then MonDico(a(I, 1)) = ""
Next I
Me.ComboBox5.List = MonDico.keys
End Sub
Private Sub listecbb6()
Set f = Sheets("Pano")
Set MonDico = CreateObject("Scripting.Dictionary")
a = f.Range("G7:G" & f.[A65000].End(xlUp).Row) ' tableau a(n,1) pour rapidité
For I = LBound(a) To UBound(a)
If a(I, 1) <> "" Then MonDico(a(I, 1)) = ""
Next I
Me.ComboBox6.List = MonDico.keys
End Sub
Je voudrais lier les deux avec ce code :
Private Sub ComboBox5_Change()
Me.ComboBox6.Value = ""
Me.ComboBox6.ListIndex = Me.ComboBox5.ListIndex
End Sub
Cependant ça ne fonctionne pas ici :
Me.ComboBox6.ListIndex = Me.ComboBox5.ListIndex
Cela annonce une "erreur 380 et impossible de définir la propriété ListIndex" quand je selectionne une valeur qui a un indice ListIndex superieur a 174.
Je vous joint un fichier.
Merci pour votre aide