pascal21
XLDnaute Barbatruc
bonjour le forum
j'ai ce code qui me permet de filtrer les lignes contenant la valeur de G1
MAIS si la référence recherchée n'existe pas,j'aimerais rajouter une msgbox qui indiquerait que la référence recherchée n'existe pas
avec cette question v oulez vous faire une autre recherche si "oui" alors textbox1. clearcontents
si réponse non label1.visible = true
pouvez-vous m'aider merci
Code:
If Target.Address(0, 0) = "G1" Then
Dim IndexLigne
If IsEmpty([G1]) Then
Rows.Hidden = False
Else
IndexLigne = Application.Match([G1], Range("D6:D" & Rows.Count), 0)
If IsError(IndexLigne) Then IndexLigne = Application.Match([G1], Range("G6:G" & Rows.Count), 0)
If Not IsError(IndexLigne) Then
If IndexLigne > 1 Then Range("A6:A" & IndexLigne + 4).EntireRow.Hidden = True
End If
End If
End If
MAIS si la référence recherchée n'existe pas,j'aimerais rajouter une msgbox qui indiquerait que la référence recherchée n'existe pas
avec cette question v oulez vous faire une autre recherche si "oui" alors textbox1. clearcontents
si réponse non label1.visible = true
pouvez-vous m'aider merci