Excel 2007 Activex Option Button Default?

Josh - Apr 19, 2012 at 01:49 PM
 Josh - Apr 20, 2012 at 09:19 AM

I have two activex option buttons, Yes and No.
How do I get it to display "No" as marked as a default?
I have created a process that copies the entire worksheet and it has these buttons on it, so I need it to default to the "No" button.
Any assistance would be greatly appreciated.
Thank you,

2 responses

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Apr 19, 2012 at 04:21 PM
Are you create the controls on run time or they are already created. You can set its value to "true". Default is false.
Ok, after playing around with the code a bit, I figured it out. I needed to use NwSheet.OptionButton1.Value = True, instead of OptionButton1.Value = True. I couldn't explain why, but it does the trick. I am guessing it has something to do with it trying to change the option button status on all the buttons. Now, I am trying to figure out how to lock the previous option buttons so they can't be changed after the command button is clicked.
Sometimes I just need to talk through the process with someone/somewhere to figure it out. I appreciate the outlet for my mental excercises.
Thank you,