Bonjour à tous,
Quand j'utilise ma fenêtre (combobox) je n'obtiens aucune liste déroulante et un erreur d'incompatibilité apparaît.
Voici le code:
Private Sub ComboBox1_Change()
[J10] = ComboBox1
End Sub
Private Sub ComboBox1_DropButtonClick()
Dim temp()
Set F = Sheets("Feuille liaison BD")
Set MonDico = CreateObject("Scripting.Dictionary")
For Each c In F.Range("A3:A" & F.[A65000].End(xlUp).Row)
If c.Value <> "" Then MonDico.Item(c.Value) = c.Value
Next c
temp = MonDico.items
Call tri(temp, LBound(temp), UBound(temp))
Me.ComboBox1.List = temp
End Sub
Sub tri(a(), gauc, droi) ' Quick sort
ref = a((gauc + droi) \ 2)
g = gauc: d = droi
Do
Do While a(g) < ref: g = g + 1: Loop
Do While ref < a(d): d = d - 1: Loop
If g <= d Then
temp = a(g): a(g) = a(d): a(d) = temp
g = g + 1: d = d - 1
End If
Loop While g <= d
If g < droi Then Call tri(a, g, droi)
If gauc < d Then Call tri(a, gauc, d)
End Sub
L'erreur est reliée à la valeur c ( marqué en orange). J'ai refais les liens et rien à faire la même erreur se reproduit.
Avec vous une idée pourquoi?
Cydor007
Quand j'utilise ma fenêtre (combobox) je n'obtiens aucune liste déroulante et un erreur d'incompatibilité apparaît.
Voici le code:
Private Sub ComboBox1_Change()
[J10] = ComboBox1
End Sub
Private Sub ComboBox1_DropButtonClick()
Dim temp()
Set F = Sheets("Feuille liaison BD")
Set MonDico = CreateObject("Scripting.Dictionary")
For Each c In F.Range("A3:A" & F.[A65000].End(xlUp).Row)
If c.Value <> "" Then MonDico.Item(c.Value) = c.Value
Next c
temp = MonDico.items
Call tri(temp, LBound(temp), UBound(temp))
Me.ComboBox1.List = temp
End Sub
Sub tri(a(), gauc, droi) ' Quick sort
ref = a((gauc + droi) \ 2)
g = gauc: d = droi
Do
Do While a(g) < ref: g = g + 1: Loop
Do While ref < a(d): d = d - 1: Loop
If g <= d Then
temp = a(g): a(g) = a(d): a(d) = temp
g = g + 1: d = d - 1
End If
Loop While g <= d
If g < droi Then Call tri(a, g, droi)
If gauc < d Then Call tri(a, gauc, d)
End Sub
L'erreur est reliée à la valeur c ( marqué en orange). J'ai refais les liens et rien à faire la même erreur se reproduit.
Avec vous une idée pourquoi?
Cydor007