Microsoft Office Tutorials and References
In Depth Information
Determining the Most Appropriate User Interface
Figure 6-2: A dialog box created with Excel’s UserForm feature.
Using ActiveX controls on a worksheet
Excel also lets you add the UserForm ActiveX controls to a worksheet’s drawing layer (an invisible
layer on top of a sheet that holds pictures, charts, and other objects). Figure 6-3 shows a simple
worksheet model with several UserForm controls inserted directly on the worksheet. This sheet
contains the following ActiveX controls: a CheckBox, a ScrollBar, and two sets of OptionButtons.
This workbook uses no macros. Rather, the controls are linked to worksheet cells.
This workbook is available on the companion CD-ROM. The file is named worksheet
Perhaps the most common control is a CommandButton. By itself, a CommandButton doesn’t do
anything, so you need to attach a macro to each CommandButton.
Figure 6-3: You can add UserForm controls to worksheets and link them to cells.