Bonjour,
J'ai suivi l'exemple de recherche du site : https://www.blog-excel.com/creer-un-champ-de-recherche-vba/
J'ai un petit problème et 2-3 questions:-)
Voici mon code:
Option Compare Text
Private Sub ListBox1_Click()
End Sub
Private Sub TextBox1_Change()
Application.ScreenUpdating = False
Range("A2:C5000").Interior.ColorIndex = 2
ListBox1.Clear
If TextBox1 <> "" Then
For ligne = 16 To 5000
For colonne = 1 To 3
If Cells(ligne, colonne) Like "*" & TextBox1 & "*" Then
Range(ligne & ":" & ligne).Interior.ColorIndex = 43
ListBox1.AddItem Cells(ligne, 1) & " - " & Cells(ligne, 3) & " - " & Cells(ligne, 4)
End If
Next
Next
End If
End Sub
Lorsque je fais une recherche une partie lignes des collones après la 3 restent vertes.
Comment faire pour reseter la couleur ?
Est il possible de pouvoir cliquer sur un des champ et arriver a la bonne ligne ?
Merci d'avance