The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Displaying a Custom Dialog Box

Office 2007

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

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

Private Sub GetUserName()
End Sub
Bb208851.vs_note(en-us,office.12).gif  Note
Use the Unload method in an event procedure, such as the Click event procedure for a command button, to close a dialog box.

Community Additions