EventMode property (window)

Examples


The EventMode property specifies whether VBA window events occur for the original or modified version of the window.

Syntax

window.EventMode [= mode]

Parameters

window – A window object.

mode – A constant specifying when events occur:

[spacer]

Constant

Description

emOriginalOnly

Window events occur only for the original version of the window.

emModifiedOnly

Window events occur only for the modified version of the window.

emNever

Window events don’t occur for the window.


Comments

If you modify a window using the Modifier, VBA window events will occur for the modified window only if you set the EventMode property to emModified. To change the EventMode property for the window object, use the Visual Basic Properties window.

If you modify a window containing a grid (such as a lookup window), you must change the EventMode property to emModifiedOnly for both the window and grid objects. Window and grid events can then occur for both objects.

Windows modified using the Modifier include a period (.) at the beginning of the window’s caption. Windows that invoke VBA events include a period at the end of the window’s caption.


Documentation Feedback