EnableModeless Method

Home Page (Objects)OverviewFAQReference

Applies to: Application object

Enables or disables existing modeless windows in Developer Studio.

Syntax

object.EnableModeless boolean

Parameters

object

An expression that evaluates to an Application object. When you use the EnableModeless method of the Application object, you can omit object because the name of the Application object is implied when you access its properties and methods.

boolean

A Boolean that specifies whether Developer Studio should enable or disable its modeless windows. Possible values are:

Remarks

Add-ins typically use EnableModeless to disable modeless windows before displaying a modal dialog so that the user cannot click the windows while the dialog is showing.

Example

The following example reports a date:

EnableModeless False
MsgBox "The current date is " & Date
EnableModeless True

See Also   AddCommand method, AddCommandBarButton method, AddKeybinding method, SetAddInInfo method.