Show Method

           

Displays a UserForm object.

Syntax

[object.]Show modal

The Show method syntax has these parts:

Part Description
object Optional. An object expression that evaluates to an object in the Applies To list. If object is omitted, the UserForm associated with the active UserForm module is assumed to be object.
modal Optional. Boolean value that determines if the UserForm is modal or modeless.

Settings

The settings for modal are:

Constant Value Description
vbModal 1 UserForm is modal. Default.
vbModeless 0 UserForm is modeless.

Remarks

If the specified object isn't loaded when the Show method is invoked, Visual Basic automatically loads it.

Note In Microsoft Office 97, if a UserForm is set to display as modeless, it causes a run-time error; Office 97 UserForms are always modal.

When a UserForm is modeless, subsequent code is executed as it's encountered. Modeless forms do not appear in the task bar and are not in the window tab order.

Note You may lose data associated with a modeless UserForm if you make a change to the UserForm project that causes it to recompile, for example, removing a code module.

When a UserForm is modal, the user must respond before using any other part of the application. No subsequent code is executed until the UserForm is hidden or unloaded. Although other forms in the application are disabled when a UserForm is displayed, other applications are not.