Private Sub C4_Change()
Label6.Caption = ""
Dim i&, fin&
C1 = "": C2 = "": C3 = ""
If C4 = "" Then L1.ListItems.Clear: Label6.Caption = "": Exit Sub
fin = Feuil1.Range("A65536").End(xlUp).Row
aa = Feuil1.Range("A4: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
On Error Resume Next
With UserForm1
A1.Visible = False
A3.Visible = False
A4.Visible = False
For li = 1 To L1.ListItems.Count
UserForm1.Controls(L1.ListItems(li).ListSubItems(1).Text).Visible = True
Next li
End With
End Sub