Open Excel from a VB6 application then use "Find and Replace" form

D

Dan Tabla

Hi all,
I need to open Excel from an VB6 application and run the "Find and Replace"
form using a value that the VB application has it.
I like the "Find and Replace" form better that using regular code because it
has an window that opens and shows what are the search results.
Any suggestion is welcome!!!
 
J

joel

You can use the standard built in dialog like this

Sub test()

Set FindDialog = Application.Dialogs(xlDialogFormulaFind)

Results = FindDialog.Show ' results is a boolean

MyResults = ActiveCell.Value

End Sub


I've never been able to figure out how to get the results from hti
dialog. It seems to only bring up a tool that the user can use but no
the VBA code.

The parameter are :
text, in_num, at_num, by_num, dir_num, match_case, match_byte

So you can use the following to find the string 123

Results = FindDialog.Show(arg1:="123"
 
D

Dan Tabla

Thank you so much Joel. Sorry for the delayed "Thank you!", I couldnt find my
thread in the web site..now I learned how to do it...

Thank you so much for helping me. It will be a pleasure to show you the
final result if you wish to...

Happy New Year and all the best!
 

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

Top