Application.Dialogs(xlDialogFormulaFind).....HELP!!!!!!

  • Thread starter Thread starter jason
  • Start date Start date
J

jason

I've got the below code:

Sheets("Data").Activate
Cells.Select
Application.Dialogs(xlDialogFormulaFind).Show "Hello"

So when you go onto the sheet "Data" the find diallog box comes up
with "Hello" in it.
There are loads of instances of "Hello" on the Data sheet - how can I
modify the above code, so that when the macro is run the first
instance of Hello has already been found?

Any help greatly appreciated

Jason
 
Dim rng as range
Sheets("Data").Activate
Cells.Select
set rng = Cell.Find("Hello")
if not rng is nothing then
rng.Select
Application.Dialogs(xlDialogFormulaFind).Show "Hello"
end if
 
Nice one Tom!
I ended up using:

Dim rng as range
Sheets("Data").Activate
Cells.Select
Set rng = Cells.Find("Hello")
If Not rng Is Nothing Then
rng.Activate
Application.Dialogs(xlDialogFormulaFind).Show "Hello"
End If

I just changed 'rng.Select' to 'rng.Activate' so that when the user
hits the find button it will go to the next instances of "hello".

Thanks again for the help
Jason
 

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