Microsoft Office Tutorials and References
In Depth Information
Use Dialog Box Controls to Input Data
Use Dialog Box Controls
to Input Data (continued)
Adding a form control to a worksheet does not
do very much by itself. To make the control
useful, you must link it to a worksheet cell.
That way, when the user changes the state or
value of the control, the resulting change is
reflected in the linked cell.
The value you see in the linked worksheet cell
depends on the type of control. A check box
inserts the value TRUE when it is checked,
and FALSE when it is unchecked. Option
buttons return a number based on the selected
option: the first option returns 1, the second
option returns 2, and so on. Scroll bars and
spin boxes return a value from a range of
values that you specify. List boxes and combo
boxes get their items from a worksheet range,
and they return the position of the selected
item in the list, where the first item in the list
returns 1, the second item returns 2, and so
on. To get the actual list value, you must use
the INDEX() worksheet function, as described
in the second Tip.
Link a Control to a
1 Right-click the control.
2 Click Format Control.
The Format Control
dialog box appears with
the Control tab displayed.
3 Click inside the Cell
4 Click the cell you want to
use to store the control’s
Excel inserts the cell
address in the Cell
5 Click OK.
When the user changes
the value of the control,
the new value appears
in the linked cell.