Re : Maccro : bouton recherche mutlicritères qui appel un formulairede recherche
bonjour le fil pour adilprodigy le code qui envoie dans les textboxs
Private Sub Lbx1_Click()
For e = 1 To 6
Controls("Textbox" & e) = Lbx1.List(Lbx1.ListIndex, e - 1)
Next e
End Sub
pour Carthman si j ai compris recherche indiferament sur les 6 colonnes
si c est pas ca envoi un zip avec le resultat desire
Private Sub Tbx1_Change()
On Error Resume Next
Application.ScreenUpdating = False
t = Range("a8:f" & Range("a65536").End(xlUp).Row)
Lbx1.Clear
X = 1
For i = 1 To UBound(t)
For j = 1 To 6
If Left(t(i, j), Len(Tbx1)) = Left(Tbx1, Len(Tbx1)) Then
ReDim Preserve ta(1 To 6, 1 To X)
For k = 1 To 6
ta(k, X) = t(i, k)
Next k: X = X + 1: End If: Next j: Next i
Lbx1.List = Application.Transpose(ta)
If X - 1 = 1 Then
For e = 1 To 6
Controls("Textbox" & e) = Lbx1.List(Lbx1.ListIndex + e)
Next e: Lbx1.Clear: End If
Erase t, ta
If Tbx1 = "" Then
Lbx1.Clear: Label2.Caption = ""
For e = 1 To 6: Controls("Textbox" & e) = "": Next e: Lbx1.Clear: End If
Beep
End Sub
on peut aussi faire recherche en selectionnant une colonne defini a voir!!