Question about "Find" function in Edit menu

  • Thread starter Thread starter cpayneHTE
  • Start date Start date
C

cpayneHTE

is there any way to default to the "workbook" setting instead of "sheet" when
using the find function?
 
the setting "sticks" as long as Excel remains open, so perhaps run a macro?
 
That setting can't be changed via "normal" excel code.

Maybe using Sendkeys????
 
Sendkeys is something I wouldn't use if I were sharing the macro with others.

Too many things can go wrong.

If I have to use it for my own personal macros, then I won't be upset when one
of those many things go wrong.
 
Not sure I understand the objective but if it's to reset the options in the
Find dialog to their default settings this macro should do it

Sub ResetFind()
Dim rng As Range

On Error Resume Next
Set rng = Cells.Find(What:="", _
LookIn:=xlFormulas, _
SearchOrder:=xlRows, _
LookAt:=xlPart, _
MatchCase:=False)

End Sub

Regards,
Peter T
 
In xl2002+ (I think), there's an additional "within" setting under the Options
button to look in the entire workbook.

That setting isn't exposed through VBA.
 
Ah ha - that also explains why I didn't understand the objective !

Regards,
Peter T
 

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

Back
Top