I took a second look at your posting and it looks like you might be able to
use a macro with the Find function in conjunction with an input box to do
what you want. If you want a method to search through a workbook for text or
a value then maybe this little snippet will do the job.
Sub scribe()
Dim c As Range, wb As Workbook, sh As Worksheet
Set wb = ActiveWorkbook
For Each sh In wb.Sheets
Set c = Cells.Find(InputBox("Enter", "A"), LookIn:=xlValues)
If Not c Is Nothing Then
MsgBox c.Address
Exit Sub
End If
Next
End Sub
As soon as it finds the first occurence it displays a message box showing
the location of the data the exits the sub when the message box is closed.
It can, of course be modified to different parameters.
"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