Private Sub CommandButton1_Click()
ListBox1.Clear
recherchemot
End Sub
Private Sub recherchemot()
Dim firstAddress As String
ad = "a2:" & Sheets("base").Cells.SpecialCells(xlCellTypeLastCell).Address(0, 0)' on recherche dans l'ensemble de la feuille
With Sheets("base").Range(ad)
Set cel = .Find(TextBox1.Value, LookIn:=xlValues, SearchOrder:=xlByRows)' on recherche ligne par ligne
If Not cel Is Nothing Then
firstAddress = cel.Address
Do
ligne2 = cel.Row
If ligne2 <> ligne1 Then ' on vérifie que la valeur n'a pas été trouvé sur la ligne
' remplir la listbox ou combobox ou Listview
ListBox1.AddItem .Range("A" & ligne2)
'
ligne1 = cel.Row ' on mémorise le numéro de la ligne
End If
Set cel = .FindNext(cel) 'cellule suivante
Loop While Not cel Is Nothing And cel.Address <> firstAddress ' si on recommence la recherche alors fin de la recherche
End If
ligne2 = 0
End With
End Sub