Option Compare Text
Label6.Caption = ""
C4.Text = Format(C4.Text, ">")
Dim i&, fin&
C1 = "": C2 = "": C3 = "": C5 = ""
If C4 = "" Then L1.ListItems.Clear: Label6.Caption = "": Exit Sub
fin = Feuil1.Range("A65536").End(xlUp).Row
aa = Feuil1.Range("A2:I" & fin)
For i = 1 To UBound(aa)
For A = 1 To UBound(aa, 2)
If aa(i, A) Like "*" & C4 & "*" Then aa(i, 9) = "oui"
Next A
Next i
Y = 1
For i = 1 To UBound(aa)
If aa(i, 9) = "oui" Then Y = Y + 1
Next
If Y = 2 Then Label6.Caption = Y - 1 & " Ligne faisant référence à votre recherche a été trouvée "
If Y > 2 Then Label6.Caption = Y - 1 & " Lignes faisant référence à votre recherche ont été trouvées "
If Y < 2 Then L1.ListItems.Clear: Label6.Caption = "": GoTo 1
ReDim bb(Y - 1, 8)
Y = 1
For i = 1 To UBound(aa)
If aa(i, 9) = "oui" Then
For A = 1 To 8
bb(Y, A) = aa(i, A)
Next A
Y = Y + 1
End If
Next i
With L1
.ListItems.Clear
.View = lvwReport
.FullRowSelect = True
.Gridlines = True
For i = 1 To UBound(bb)
.ListItems.Add , , bb(i, 1)
For A = 2 To UBound(bb, 2)
.ListItems(.ListItems.Count).ListSubItems.Add , , bb(i, A)
Next A
Next i
1 End With
End Sub