J'ai essaye cela me convient parfaitement, MERCI !
Il ne reste plus qu'a trouver pour la recherche incrémentale ...
Je l'ai mis sous cette forme pour plus de lisibilité dans ChoixListbox8:
For i = LBound(TblBD) To UBound(TblBD)
d(CStr(TblBD(i, 17)) + " - " + CStr(TblBD(i, 18))) = ""
Next i
Me.ChoixListBox8.List = liste_triée_sans_doublons(d.keys)
Sub Affiche()
Dim i As Long
Dim j As Byte, k As Byte
Dim dchoisis(1 To 9)
Set dchoisis1 = CreateObject("Scripting.Dictionary")
For i = 0 To Me.ChoixListBox1.ListCount - 1
If Me.ChoixListBox1.Selected(i) Then dchoisis1(Me.ChoixListBox1.List(i, 0)) = ""
Next i
Set dchoisis2 = CreateObject("Scripting.Dictionary")
For i = 0 To Me.ChoixListBox2.ListCount - 1
If Me.ChoixListBox2.Selected(i) Then dchoisis2(Me.ChoixListBox2.List(i, 0)) = ""
Next i
Set dchoisis3 = CreateObject("Scripting.Dictionary")
For i = 0 To Me.ChoixListBox3.ListCount - 1
If Me.ChoixListBox3.Selected(i) Then dchoisis3(Me.ChoixListBox3.List(i, 0)) = ""
Next i
Set dchoisis4 = CreateObject("Scripting.Dictionary")
For i = 0 To Me.ChoixListBox4.ListCount - 1
If Me.ChoixListBox4.Selected(i) Then dchoisis4(Me.ChoixListBox4.List(i, 0)) = ""
Next i
Set dchoisis5 = CreateObject("Scripting.Dictionary")
For i = 0 To Me.ChoixListBox5.ListCount - 1
If Me.ChoixListBox5.Selected(i) Then dchoisis5(Me.ChoixListBox5.List(i, 0)) = ""
Next i
Set dchoisis6 = CreateObject("Scripting.Dictionary")
For i = 0 To Me.ChoixListBox6.ListCount - 1
If Me.ChoixListBox6.Selected(i) Then dchoisis6(Me.ChoixListBox6.List(i, 0)) = ""
Next i
Set dchoisis7 = CreateObject("Scripting.Dictionary")
For i = 0 To Me.ChoixListBox7.ListCount - 1
If Me.ChoixListBox7.Selected(i) Then dchoisis7(Me.ChoixListBox7.List(i, 0)) = ""
Next i
Set dchoisis8 = CreateObject("Scripting.Dictionary")
For i = 0 To Me.ChoixListBox8.ListCount - 1
If Me.ChoixListBox8.Selected(i) Then dchoisis8(Me.ChoixListBox8.List(i, 0)) = ""
Next i
n = 0: Dim Liste()
For i = LBound(TblBD) To UBound(TblBD)
tmp = TblBD(i, 1)
tmp2 = TblBD(i, 2)
tmp3 = TblBD(i, 3)
tmp4 = TblBD(i, 4)
tmp5 = TblBD(i, 5)
tmp6 = TblBD(i, 6)
tmp7 = TblBD(i, 7)
tmp8 = TblBD(i, 17) + TblBD(i, 18)
If (dchoisis1.Exists(tmp) Or dchoisis1.Count = 0) _
And (dchoisis2.Exists(tmp2) Or dchoisis2.Count = 0) _
And (dchoisis3.Exists(tmp3) Or dchoisis3.Count = 0) _
And (dchoisis4.Exists(tmp4) Or dchoisis4.Count = 0) _
And (dchoisis5.Exists(tmp5) Or dchoisis5.Count = 0) _
And (dchoisis6.Exists(tmp6) Or dchoisis6.Count = 0) _
And (dchoisis7.Exists(tmp7) Or dchoisis7.Count = 0) _
And (dchoisis8.Exists(tmp8) Or dchoisis8.Count = 0) Then
n = n + 1
ReDim Preserve Liste(1 To NbCol + 1, 1 To n)
For k = 1 To NbCol + 1
Liste(k, n) = TblBD(i, k)
Next k
End If
Next i
If n > 0 Then Me.ListBox1.Column = Liste Else Me.ListBox1.Clear
End Sub
J'ai rajouter ceci dans le "Sub Affiche"mais cela filtre sans résultat apparent....
tmp8 = TblBD(i, 17) + TblBD(i, 18)
A+