search backwards

S

SF

When I search for a word in a very large document, I may find it several
times in several different places. Sometimes I want to go back to the
previous instance of that word and check something. But backing up requires
several steps in the regular search box and then I have to undo those steps
to go forward again. Is there a small bit of code that I can put in a macro
to go back to the last instance with one click?

Thanks
 
S

SF

Okay, I recorded a macro to find a string and fiddled with it until I came
up with this:

Sub FindBack()
Selection.Find.Forward = False
Selection.Find.Execute
Selection.Find.Forward = True
End Sub

It works, but I'm not sure if it's the best way.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top