Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel: Only allow one checkbox to be checked per section? 1

Status
Not open for further replies.

Gymnast14

Technical User
Dec 21, 2006
38
US
I have an unofficial "form" in excel. I have a group of five statements under a category, like "Motivation". I have a checkbox next to each statement.

I only want to allow one checkbox to be checked per category. How can I do this??

To clarify, I haven't done anything to make this an official form - I just went to the control box and used the checkbox item. Thanks!
 



Hi,

This is what an Option Button or Radio Button, as it is sometimes called, is for. They are mutually exclusive within a group.

Skip,
[sub]
[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue][/sub]
 
If you want one group per category of Option buttons you need to specify what group which button belongs to. Type in a name for a GroupName in the Properties window for each Option button, choosing a unique name for each group.

Alternatively you could use Options buttons from the Forms toolbar, and then draw a Group Box around buttons you want in a group ( much simpler ).

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Yes... you want to use radio buttons instead of checkboxes. Group them together, and it will only allow one radio button to be checked.

HOWEVER..... the caveat to that is, you can't easily clear them.... so you will need to have a radio button as well in the group that says "None" or "Doesn't apply" or "N/A" or something. Because with radio buttons, you don't have the option of checking then un-checking it.

Otherwise, this *could* be done with checkboxes, but you'd have to write some script to clear other checkboxes in the group when a different one is checked. Not impossible, but kludgy.



Just my 2¢
-Cole's Law: Shredded cabbage

--Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top