Bonjour ,
j'ai récupéré un code sur le forum, et j'aimerais bien le comprendre complètement.
le voici;
Private Sub CommandButton1_Click()
ListView3.ListItems.Clear
If TextBox1 = "" Then Exit Sub
With Sheets("Base")
i = 1
Do
Set c = .Range(.Cells(i, 1), .Cells(i, 10)).Find(TextBox1, LookIn:=xlValues)
If Not c Is Nothing Then
flag = True
IniListview c.Row
End If
i = i + 1
Loop While .Cells(i, 1) <> ""
End With
If Not flag Then MsgBox "Rien trouvé !"
txtTotal = ListView3.ListItems.Count
flag = False
End Sub
bon avec ce code j'aimerais pouvoir effectuer une recherche par mot dans la listeview3. mais la variable (i) représente quoi? car j'éprouve un problème avec ce i.
excusez-moi pour la question qui peut sembler bizarre mais je veux enfin comprendre.
merci encore de votre dévouement
j'ai récupéré un code sur le forum, et j'aimerais bien le comprendre complètement.
le voici;
Private Sub CommandButton1_Click()
ListView3.ListItems.Clear
If TextBox1 = "" Then Exit Sub
With Sheets("Base")
i = 1
Do
Set c = .Range(.Cells(i, 1), .Cells(i, 10)).Find(TextBox1, LookIn:=xlValues)
If Not c Is Nothing Then
flag = True
IniListview c.Row
End If
i = i + 1
Loop While .Cells(i, 1) <> ""
End With
If Not flag Then MsgBox "Rien trouvé !"
txtTotal = ListView3.ListItems.Count
flag = False
End Sub
bon avec ce code j'aimerais pouvoir effectuer une recherche par mot dans la listeview3. mais la variable (i) représente quoi? car j'éprouve un problème avec ce i.
excusez-moi pour la question qui peut sembler bizarre mais je veux enfin comprendre.
merci encore de votre dévouement