Datasheet

22
2
3
4
5
1
6
7
The Format Object dialog box appears.
3 Click the Control tab.
The available fields depend on the control
type. This example uses a combo box.
4 Enter the range that lists the valid values.
5 Enter a cell to assign a linked cell.
6 Enter the number of items in your
drop-down list.
The value associated with your selection
appears in the linked cell.
7 Click OK.
1 Right-click the control twice.
A menu appears.
2 Click Format Control.
Assign Values to a Form Control
A
fter you add a control to a form, you can assign
values to it. For example, if your worksheet
contains a combo box, you can assign the list of
values that appear when users access the combo box.
Some controls enable you to define a range of valid
numeric values for the control. For example, if you use a
spinner, you can define the starting value and the
maximum value for the control. For combo boxes and list
boxes, you can place the options associated with the
control in a range of cells. For example, if you use a
combo box, you tell Excel the list of values used by the
control by entering the range of cells containing the
values. The values can be located on another worksheet
or even in another workbook, as long as Excel can access
the workbook when users view the worksheet that
contains the control.
You can link a cell to a control. If you link a cell to a
control, whatever value users select when utilizing the
control becomes the value in the linked cell. If you use a
combo box control or list box control, the value in the
linked cell is a number that represents the user’s
selection. Excel assigns the number based on the position
of the selected value in your list. If the list is Computer,
Monitor, Keyboard, and the user selects Monitor, the
linked cell receives the value
2, because Monitor is
second in the list.
With a control, such as a check box, you can tell Excel
whether you want the option initially selected or
unselected. Both options — selected and unselected —
have an associated value.
Assign Values to
a Form Control
03_591598-ch01.indd 2203_591598-ch01.indd 22 6/11/10 1:41 PM6/11/10 1:41 PM