Edit Find

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro that opens the Edit Find.

Sub MacroFind()
Application.SendKeys Keys:="%ef", Wait:=False
Application.SendKeys Keys:="%t", Wait:=True
End Sub

The key is that I always want it to open with the full box open where you
can select Within: Sheet or Worksheet etc..... but ... the second line of
my code does not determine if the find box already has the Options visible
and therefore if it already has the Options visibile then the second line
would shrink the box to where they are not visible. Is there code to open
the Edit Find so that the options Within: ...... Search: ...... etc will
always be visible.

Thank you,

Steven
 
SEND KEYS are often a tempting option, but there are much better ways.

Simply recording an edit find will provide you with something like this, and
then a simple addition of a variable, let alone changing the TRUE/FALSE
options, will allow you much more power and flexibility:

strSearchVal = "Find This"

Cells.Find(What:=strSearchVal, After:=ActiveCell, LookIn:=xlFormulas,
LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:= _
False, SearchFormat:=False).Activate

Let me know if this helps.
 

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