Microsoft Office Tutorials and References
In Depth Information
Creating a UserForm: An Example
Creating the UserForm
Figure 13-9 shows the completed UserForm for this example. For best results, start with a new
workbook with only one worksheet in it. Then follow these steps:
Figure 13-9: This dialog box asks the user to enter a name and a sex.
1.
Press Alt+F11 to activate the VBE.
2.
In the Project window, select the workbook’s project and choose Insert➜UserForm to
add an empty UserForm.
The UserForm’s Caption property will have its default value: UserForm1 .
3.
Use the Properties window to change the UserForm’s Caption property to Get Name
and Sex .
(If the Properties window isn’t visible, press F4.)
4.
Add a Label control and adjust the properties as follows:
Property
Value
Accelerator
N
Caption
Name:
TabIndex
0
5.
Add a TextBox control and adjust the properties as follows:
Property
Value
Name
TextName
TabIndex
1
 
Search JabSto ::




Custom Search