Option buttons

andyjames

Board Regular
Joined
May 15, 2007
Messages
133
I have a large set of option buttons all held within one frame.

Before proceeding to the next section of code I wish to check that an option has been selected.

In the past, with a much smaller set, I have had a series of IF ELSE statements testing for FALSE.

How do I do this in a much more eligant and quicker manner?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Lewiy

Well-known Member
Joined
Jan 5, 2007
Messages
4,284
Do you mean that you want to check which one has been selected, or ensure that at least one has been selected?
 
Upvote 0

andyjames

Board Regular
Joined
May 15, 2007
Messages
133
Just to ensure that one has been selected.

If i did actually want to check which had been selected would you suggest Case Selection is the best method?
 
Upvote 0

Kavy

Well-known Member
Joined
Jun 25, 2007
Messages
607
I don't no which is the best method, but i read once that if you have lots of code, the case method can slow down the code a lot.

Just my two sence, and this would proably require a lot of code to be seen making a differance or not
 
Upvote 0

Lewiy

Well-known Member
Joined
Jan 5, 2007
Messages
4,284
To ensure that at least one has been selected, you just need to set the value of one of them to True to start with as once one has been selected, you cannot unselect all of them.
 
Upvote 0

Forum statistics

Threads
1,191,121
Messages
5,984,765
Members
439,909
Latest member
daigoku

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top