Excel 2007 Activex Option Button Default?

Solved/Closed
Josh - 19 Apr 2012 à 13:49
 Josh - 20 Apr 2012 à 09:19
Hello,

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,
Josh
Related:

2 responses

rizvisa1 Posts 4478 Registration date Thursday 28 January 2010 Status Contributor Last seen 5 May 2022 766
19 Apr 2012 à 16:21
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,
Josh