setting optionbutton


Posted by Mike Merkel on July 06, 2001 5:17 AM

I inserted an optionbutton from the forms toolbar into a sheet. Now when I try to set the value or call the value of that button i get an 'object required' error. I don't understand this since the following sub is called OptionButton5_Click(), but it won't recognize OptionButton5 or Option5 as an object?????
Please help.
Thanks
Mike



Posted by AB on July 06, 2001 6:32 AM

If you're trying to make reference to the button in a standard module I suspect you forgot to include the prequalifying sheet name.

Something like: Sheets(1).OptionButton5
will probably do the trick.

Regards,
AaronThe Excel Logic Page