Excel 2010 Bible

(National Geographic (Little) Kids) #1

Chapter 42: Using UserForm Controls in a Worksheet


869


l (^) IntegralHeight: This is TRUE if the height of the ListBox adjusts automatically to dis-
play full lines of text when the list is scrolled vertically. If FALSE, the ListBox may display
partial lines of text when it is scrolled vertically.
l LinkedCell: The worksheet cell that displays the selected item.
l (^) ListFillRange: The worksheet range that contains the list items.
l ListStyle: Determines the appearance of the list items.
l (^) MultiSelect: Determines whether the user can select multiple items from the list.
Note
If you use a MultiSelect ListBox, you can’t specify a LinkedCell; you need to write a macro to determine
which items are selected. n


OptionButton

OptionButton controls are useful when the user needs to select from a small number of items.
OptionButtons are always used in groups of at least two.

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

l (^) Accelerator: A letter that lets the user select the option by using the keyboard. For
example, if the accelerator for an OptionButton is C, pressing Alt+C selects the control.
l (^) GroupName: A name that identifies an OptionButton as being associated with other
OptionButtons with the same GroupName property.
l (^) LinkedCell: The worksheet cell that’s linked to the OptionButton. The cell displays
TRUE if the control is selected or FALSE if the control isn’t selected.
Note
If your worksheet contains more than one set of OptionButton controls, you must ensure that each set
of OptionButtons has a different GroupName property. Otherwise, all OptionButtons become part of the
same set. n


ScrollBar

A ScrollBar control is useful for specifying a cell value. Figure 42.6 shows a worksheet with
three ScrollBar controls. These ScrollBars are used to change the color in the rectangle shape.
The value of the ScrollBars determines the red, green, or blue component of the rectangle’s color.
This example uses a few simple macros to change the colors.
Free download pdf