Displaying a Custom Dialog Box [Excel 2003 VBA Language Reference]

To test your dialog box in the Visual Basic Editor, click Run Sub/UserForm on the Run menu in the Visual Basic Editor.

To display a dialog box from Visual Basic, use the Show method. The following example displays the dialog box named UserForm1.

Private Sub GetUserName()
    UserForm1.Show
End Sub
		

See Also | Adding Controls to a Document | Adding Controls to a User Form | Creating a Custom Dialog Box | Creating a User Form | Initializing Control Properties | Setting Control Properties | Using ActiveX Controls on a Document | Using ActiveX Controls on Sheets | Using Control Values While Code Is Running