Option Button control

OptionButtons are useful when the user needs to select from a small number of items. OptionButtons are always used in groups of at least two. Figure 17-12 shows two sets of OptionButtons (Report Destination and Layout). One set uses graphics images (set with the Picture property).

Figure 17-12:

Two sets of Option Button controls, each contained in a Frame control.

OptionButton Controls

Report Destination Printer C File ( Email

(* Portrait r Landscape

; Cancel j OK

The following is a description of the most useful OptionButton control properties:

^ Accelerator: A letter that lets the user select the option by using the keyboard. For example, if the accelerator for an option button is C, then pressing Alt+C selects the control.

^ GroupName: A name that identifies an option button as being associated with other option buttons with the same GroupName property.

^ ControlSource: The worksheet cell that's linked to the option button. The cell displays TRUE if the control is selected or FALSE if the control is not selected.

^ Value: If True, the OptionButton is selected. If False, the OptionButton is not selected.

If your dialog box contains more than one set of OptionButtons, you must change the GroupName property for all OptionButtons in a particular set. Otherwise, all OptionButtons become part of the same set. Alternatively, you can enclose each set of OptionButtons in a Frame control, which automatically groups the OptionButtons in the frame.

0 0

Post a comment