Collapse the table of content
Expand the table of content
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Displaying a Custom Dialog Box (Word)

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
Note Note

Use the Unload method in an event procedure, such as the Click event procedure for a command button, to close a dialog box.

© 2015 Microsoft