Toggle FIND criteria

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

Guest

In the FIND dialog box, I must activate checkbox “Find entire cells onlyâ€
when the macro runs. This leaves this checkbox “checked†even after VBA code
execution ends.

I can’t just use “LookAt:=xlPart†within the sample code shown below as I
need VBA to be in “LookAt:=xlWhole†mode during executing.

How can I toggle it back from checked to non-checked when macro ends?

My current recorded by VBA:
Selection.Find(What:=ItemNumber, After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False).Activate

Thanks in advance.
 
Hi,

Try adding this line at the end:


Code:
--------------------

Selection.Find(LookAt:=xlPart).Activate

--------------------


Hope this helps.

B
 
Hi,

Try adding this line at the end:


Code:
--------------------

Selection.Find(LookAt:=xlPart).Activate

--------------------


Hope this helps.

B
 

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