View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Search with "Workbook" and "columns" built-in somehow?

In the VBA help files under Built-In Dialog Box Argument Lists, you will find
the arguments that you can pass to the dialog box as it is opened. But the
user is still restricted to those constants and cannot add abstact text or
values.

"StargateFan" wrote:

I did a lot of looking at the archives and found this simple code
brings up the search box, which is what I needed:

--------------------
Sub SearchWorkbook()
CommandBars("Edit").Controls("Find...").Execute
End Sub
--------------------

I found all sorts of other code but nothing pre-defines some of the
parameters for the search, which would be extremely helpful.

In this thread,
http://groups.google.ca/group/micros...143a5a7e?hl=en,
Tom Ogilvy says these 2 things:

1. "When you show a builtin dialog in excel, you have lost control of
it.", and
2. "You can feed it some arguments when opening".

Sometimes the Find box comes up with the options opened, sometimes
not.

Something like this is neat:
--------------------
Sub Search()
Application.Dialogs(xlDialogFormulaReplace).Show
End Sub
--------------------
but doesn't have much pre-determined.

How could one have a box come up that allows us to just enter what we
need to search for, then when we press okay, it starts the search in
the entire workbook?

Thank you! :oD