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.
Press Alt+F11 to activate the VBE.
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 .
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.)
Add a Label control and adjust the properties as follows:
Add a TextBox control and adjust the properties as follows: