Excel 2007 Activex Option Button Default? [Solved/Closed]

Report
-
 Josh -
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

2 replies

Posts
4476
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
August 2, 2020
760
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