bobjazz
XLDnaute Impliqué
Bonsoir le Forum
En dessous, il y a une macro qui me sert à rechercher un mot dans un classeur entier
Je voudrais la continuer en faisant un choix en fin de recherche
Choix entre nouvelle recherche et fermer
Je Bloque
Voila la macro
Sub Rechercher()
mot = InputBox('Mot à rechercher ?')
For Feuille = 1 To Sheets.Count
Sheets(Feuille).Select
Set trouvé1 = Cells.Find(What:=mot)
If Not trouvé1 Is Nothing Then
trouvé1.Activate
étiq:
If MsgBox('Suivant ?', 4) = vbNo Then Exit Sub
Set trouvé2 = Cells.FindNext(After:=ActiveCell)
If trouvé2.Column <> trouvé1.Column Or trouvé2.Row <> trouvé1.Row Then
trouvé2.Activate
GoTo étiq
End If
End If
Next Feuille
'
End Sub
Merci au forum
Bonne Soirée
Bobjazz
En dessous, il y a une macro qui me sert à rechercher un mot dans un classeur entier
Je voudrais la continuer en faisant un choix en fin de recherche
Choix entre nouvelle recherche et fermer
Je Bloque
Voila la macro
Sub Rechercher()
mot = InputBox('Mot à rechercher ?')
For Feuille = 1 To Sheets.Count
Sheets(Feuille).Select
Set trouvé1 = Cells.Find(What:=mot)
If Not trouvé1 Is Nothing Then
trouvé1.Activate
étiq:
If MsgBox('Suivant ?', 4) = vbNo Then Exit Sub
Set trouvé2 = Cells.FindNext(After:=ActiveCell)
If trouvé2.Column <> trouvé1.Column Or trouvé2.Row <> trouvé1.Row Then
trouvé2.Activate
GoTo étiq
End If
End If
Next Feuille
'
End Sub
Merci au forum
Bonne Soirée
Bobjazz