1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| Dim Plage As Range, cell As Range
Dim Recherche As String, Adresse As String
Dim Ligne As Integer, n As Integer
Dim C As Range
Feuil1.ListBox3.Clear
n = 0
Recherche = Feuil1.Txtb1.Value
Ligne = Sheets("bdCarr").Range("M" & "65536").End(xlUp).Row
Set Plage = Sheets("bdCarr").Range("M" & "2:" & "M" & Ligne)
With Plage
Set C = .Find(Recherche, , xlValues)
If Not C Is Nothing Then
Adresse = C.Address
Do
If UCase(Recherche) = UCase(Left(C, Len(Recherche))) Then
Feuil1.ListBox3.AddItem C.Offset(0, 0), n
Feuil1.ListBox3.List(n, 1) = C.Offset(0, 1)
Feuil1.ListBox3.List(n, 2) = C.Offset(0, 2)
Feuil1.ListBox3.List(n, 3) = C.Offset(0, 3)
Feuil1.ListBox3.List(n, 4) = C.Offset(0, 4)
n = n + 1
End If
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> Adresse
End If
End With |
Partager