Excel 2019 Bible

(singke) #1

Part VI: Automating Excel


Adding controls
The Toolbox, also shown in Figure 44.6, contains various ActiveX controls that you can add
to your UserForm. If the Toolbox is not visible, choose View ➪ Toolbox.

When you move the mouse pointer over a control in the Toolbox, the control’s name
appears. To add a control, select the control in Toolbox and either click in the form to get
the default size or drag the desired size onto the form. After adding a control, you can
move it or change its size.

Table 44.2 lists the Toolbox controls.

TABLE 44.2 Toolbox Controls

Control Description
Select Objects Lets you select other controls by dragging
Label Adds a label (a container for text)
TextBox Adds a text box, which allows the user to type text
ComboBox Adds a combo box (a drop-down list)
ListBox Adds a list box, which allows the user to select an item from a list
CheckBox Adds a check box to control Boolean options
OptionButton Adds an option button to allow the user to select from multiple
options
ToggleButton Adds a toggle button to control Boolean options
Frame Adds a frame (a container for other objects)
CommandButton Adds a command button (a clickable button)
TabStrip Adds a tab strip (a container for other objects)
MultiPage Adds a multipage control (a container for other objects)
ScrollBar Adds a scrollbar, which allows the user to specify a value
by dragging a bar
SpinButton Adds a spin button, which allows the user to specify a value
by clicking up or down
Image Adds a control that can contain an image
RefEdit Adds a reference edit control, which lets the user select a range

You can also place some of these controls directly on your worksheet. See Chapter 45, “Using UserForm
Controls in a Worksheet,” for details.
Free download pdf