Using controls on worksheets
Detailed description of the controls (2)
Typically, a checkbox control is used to enable the user to turn something on or off, or to answer a yes/no question. The checkbox always stands on its own, allowing multiple options to be selected (checked) at the same time.
The option button is very similar to the check box, but only allows mutually exclusive choices to be made; in a set of option buttons, only one option can be "checked". If you take no specific action then all option buttons on one sheet will be treated as one single group. It is possible to have multiple groups on a sheet. The method to achieve this differs between the two sets of option buttons.
The method to tie an option button to a cell differs between the two types too.
Forms option button
To group option buttons from the forms toolbar, first draw frames on your sheet. Then draw the option buttons INSIDE the frame:
Fig 8 : Two frames with option buttons.
Option buttons from the forms toolbar share their linked cell. The value returned to the cell is the index number of the selected option. Note that the index will match the order in which you created the option buttons.
To select a control from the forms toolbar (for example to be able to move the control), either right-click the control or control+click it. To select multiple controls to change their properties in one go, hold control while clicking them.
Group controls you want to keep together, for example those within a frame, by control+clicking them in turn and then right-clicking on one of their edges and selecting "Grouping", "Group".
Control toolbox option button (ActiveX)
The option button from the Control toolbox toolbar (ActiveX) has a special property to set up which work together, called the Groupname property:
Fig 9: Groupname property of the ActiveX OptionButton control.
If you do not change this property, all option buttons on a sheet work together as a single group.
ActiveX option buttons all have their own linked cell, which will receive the checked state of their parents as a True/False value.
TIP: You can get at the properties window of the controls by right-clicking a control and selecting "Properties". You can also click the appropriate button on the Control Toolbox toolbar. In Excel 2007 and up, you'll find that button on the Developer tab, within the Controls group.