MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Option button help


Posted by Rick Alford on September 15, 2000 1:08 AM

I would like to place an option button on my worksheet to do a simple "find" command however when I record the macro to do this I can't stop the recording while the find dialog box is open. What is the syntax for the find command that will leave the box open waiting for user input then close it when the user exits?

Thanks in advance,
Rick


Posted by Ivan Moala on September 15, 0100 1:51 AM

Rick, the macro simply records the hard coded
actions and doesn't display the commands to activate
the dialogs.
You could look @ application.dialogs BUT an easier
method is to do a search of the commandbutton ID
and exercute this here is the code to do show the
FIND dialog

Sub Find()
CommandBars.FindControl(Id:=1964).Execute
End Sub

HTH


Ivan

Posted by Rick Alford on September 15, 0100 2:22 PM

Ivan,
This did'nt work. It just appears to just loop. I've tried many variations but to no avail. I've decided to just place a user note on the sheet to use Ctrl-F to find an item.

thanks,
Rick


Posted by Ivan Moala on September 15, 0100 11:20 PM

Sorry wrong number try

Sub Find()
CommandBars.FindControl(Id:=1849).Execute
End Sub

ivan