Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Displays the specified built-in Word dialog box until either the user closes it or the specified amount of time has passed. Returns a Long that indicates which button was clicked to close the dialog box.
Syntax
expression. Display
( _TimeOut_
)
expression Required. A variable that represents a 'Dialog' object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
TimeOut | Optional | Variant | The amount of time that Word will wait before closing the dialog box automatically. One unit is approximately 0.001 second. Concurrent system activity may increase the effective time value. If this argument is omitted, the dialog box is closed when the user closes it. |
Return value
Long
Remarks
The Display method returns the following possible values.
Return value | Description |
---|---|
-2 | The Close button. |
-1 | The OK button. |
0 (zero) | The Cancel button. |
> 0 (zero) | A command button: 1 is the first button, 2 is the second button, and so on. |
Example
This example displays the About dialog box for approximately ten seconds.
Dim dlgAbout As Dialog
Set dlgAbout = Dialogs(wdDialogHelpAbout)
dlgAbout.Display TimeOut:=10000
This example displays the Customize dialog box.
Dialogs(wdDialogToolsCustomize).Display
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.