Share via


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:

  • True   Enables all modeless windows, returning Developer Studio to its normal state. Use this after an add-in has dismissed its modal dialog box.

  • False   Disables all modeless windows. Use this before an add-in displays a modal dialog box.

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.