Label Holds text that is not editable except through code.
TextBox Holds text that users can enter or modify.
Continued
CHAPTER 4 n USERFORMS 135
Table 4-1. Continued
Toolbox Button Command Description
ComboBox A combination of a list box and a text box. Users can
choose an item from a list or enter a value in the text
box.
ListBox Displays a list of items from which users can choose.
CheckBox Indicates a true or false value.
OptionButton Presents multiple choices, of which only one can be
selected.
ToggleButton A button that toggles off and on.
Frame A grouping for controls such as option buttons or
check boxes. Users can only select one of a group of
controls placed inside a Frame control.
CommandButton A button the user can click to perform an action.
TabStrip Multiple pages in the same form area.
MultiPage Multiple screens of information.
ScrollBar Provides quick navigation through a long list of
items. It is also useful for indicating the current
position on a scale, or as an input device or indicator
of speed or quantity.
SpinButton Increments or decrements a numeric value.
Image Presents an image from a bitmap, icon, or metafile.
RefEdit Simulates the behavior of the reference edit boxes
such as the Range selector in the Print Area section of
the Page Setup dialog box.
On UserForm1, add the controls and enter the property settings listed in Table 4-2.
Table 4-2. UserForm1 Settings and Controls
Item/Property Value
UserForm ??”
Caption: Customer Survey Form
Label ??”
Caption: ID
Label ??”
Name: lblID
Caption: Label1
Label ??”
Caption: State
CHAPTER 4 n USERFORMS 136
Item/Property Value
TextBox ??”
Name: txtState
Label ??”
Caption: Phone Number
TextBox ??”
Name: txtPhone
CheckBox ??”
Name: chkHeard
Caption: Customer Has Heard of Product
CheckBox ??”
Name: chkInterested
Caption: Customer Is Interested in Product
CheckBox ??”
Name: chkFollowup
Caption: Followup Required
CommandButton ??”
Name: cmdSave
Cancel: False
Caption: Save
Default: True
CommandButton ??”
Name: cmdNew
Cancel: False
Caption: New
Default: False
CommandButton ??”
Name: cmdCancel
Cancel: True
Caption: Cancel
Default: False
The finished formshould look like Figure 4-4.
Pages:
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157