re,
Tu n'as mis que la fonction de recherche
c'est le code complet, en espérant que les combobox ne soit pas renommés, sinon
Function Liste(choix As Integer)
Dim d As Object, chx1$, chx2$, i%
Set d = CreateObject("Scripting.Dictionary")
With Sheets("Solde")
Select Case choix
Case 1
With [Type]
For i = 1 To .Rows.Count
d(.Cells(i, 1).Value) = ""
Next i
End With
Case 2
chx1 = ComboBox1.Value
With [Grammage]
For i = 1 To .Rows.Count
If .Cells(i, -1) = chx1 Then
d(.Cells(i, 1).Value) = ""
End If
Next i
End With
Case 3
chx1 = ComboBox1.Value: chx2 = ComboBox2.Value
With [Format]
For i = 1 To .Rows.Count
If .Cells(i, -3) = chx1 And .Cells(i, -1) = chx2 Then
d(.Cells(i, 1).Value) = ""
End If
Next i
End With
End Select
End With
Liste = d.keys
End Function
Private Sub ComboBox1_Change()
ComboBox2.Clear
ComboBox3.Clear
If ComboBox1.ListIndex > -1 Then ComboBox2.List = Liste(2)
End Sub
Private Sub ComboBox2_Change()
ComboBox3.Clear
If ComboBox2.ListIndex > -1 Then ComboBox3.List = Liste(3)
End Sub
Private Sub UserForm_Initialize()
ComboBox1.List = Liste(1)
End Sub