View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
swtupr swtupr is offline
external usenet poster
 
Posts: 17
Default Ctrl+F Find by value

Thanks for your quick reply Luke.
I want this behaviour of find when the user hits Ctrl+f. So where do i put
the code line which you specified. The find and replace dialog has to to
appear with the option look in Xlvalues.

Thanks

"Luke M" wrote:

Definied in the LookIn parameter

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

By searching values, XL disregards hidden columns, so solves 2 problems at
once.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"swtupr" wrote:

1. When finding a text in Excel i want to look in Values instead of formulae.
Is there a way to do this without actually changing the options in the Find
and replace dialaog manually. Can this be done automatically through code?
2. Also, When i do Ctrl+F and find something, Excel finds the value in the
hidden columns also. I dont want to highlight the hidden columns when
searching. Any work around for this?


Thanks