Word Reference

Displaying a Custom Dialog Box (Word)

Direct Answer

Displaying a Custom Dialog Box (Word) is part of the Word VBA object model. This reference page documents its syntax, parameters, and typical usage.

Reference

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() 
 UserForm1.Show 
End Sub

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

!include[Support and feedback]

Reference: Word object-model documentation • updated 06/08/2019. Rebuilt for readability; see the original for complete parameter matrices.