Bonjour toutes et tous
Merci du retour, je câle pour les colonnes E de chaque feuilles du classeur et adapter le code pas évident grr
bon en attendant, une inspiration de Pijaku merci à Pijaku
' url ici https://forum.excel-pratique.com/viewtopic.php?f=2&t=137768
ci-joint
Notes:
1) j'ai supprimé la listbox1 de la feuille Sommaire
2) on peut supprimer l'onglet TEST (s'était juste pour effectuer un test)
Important : pour le Bouton Private Sub B_ok_Click() ne pas oublier si textbox est vide
Private Sub B_ok_Click()
On Error GoTo 0
If TextBox1.Value = "" Then
MsgBox "textbox vide"
Exit Sub
End If
Dim collRanges As New Collection, item As Variant, rngActive As Range
Set rngActive = ActiveCell
Set collRanges = ChercheRange(ThisWorkbook, Worksheets("Sommaire").TextBox1.Value, "Feuil2")
For Each item In collRanges
Application.Goto item
item.Font.ColorIndex = 3
Next item
If ActiveCell = rngActive Then MsgBox "La référence : " & Worksheets("Sommaire").TextBox1.Value & " n'a pas été trouvée"
End Sub
crdlt,
André