You can specify several properties for each control that you add to a UserForm. Although each control type has its own unique properties, most of the properties are common between all controls. You change the value of each control by either typing a new value or clicking 0 and clicking a value from the drop-down list. The following table describes some of the common control properties.
CONTROL PROPERTIES |
DESCRIPTION |
(Name) |
Indicates the name of the control. |
BackColor |
Indicates the background color of the control. |
Caption |
Indicates the text that displays on the control, such as the button text. |
Font |
The font that displays all values on the control. |
Height |
The height of the control in pixels. |
Text |
The default text value of the control. |
TextAlign |
Indicates the way you align the text on the control. |
Width |
Indicates the width, in pixels, of the control. |
■ The Toolbox appears.
■ Excel displays the new dialog box.
■ To return to the Visual Basic Editor, you can click the Close button ( [x] ) on the dialog box.
-1 1 . | |
ListBOHl LrstBov - | | |
Alphabetic j c |
tegorned | |
jstBo d |T | |
BackColor BorderColot |
□ &HB 000 0005 ■ &H8 000 0006 |
BorderStyle |
0 - fm Border Sty |
BoundColumn |
■ |
rolumnrount |
■ |
Column Heads |
False |
Column Widths | |
jcontrolSource |
■ The Toolbox appears.
—0 Click a control in the Toolbox.
0 Drag the control to the UserForm.
□ In the Properties window, type a control name in the Name field.
■ Continue adding controls as desired.
■ Excel displays the new dialog box.
■ To return to the Visual Basic Editor, you can click the Close button ( [x] ) on the dialog box.
Was this article helpful?
Post a comment