This documentation is archived and is not being maintained.

EventsEnabled property

EventsEnabled property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release. See also Example Applies to

Determines whether a Microsoft Visio instance fires events.

Version added



intRet = object.EventsEnabled
object.EventsEnabled = intExpression


Integer. False (0) if event firing is disabled; True (-1) if event firing is enabled.


Required. An expression that returns an Application object.


Required Integer. False (0) to disable event firing; True (non-zero) to enable event firing.


If the EventsEnabled property is False, Visio does not fire events, run add-ons, or execute Microsoft Visual Basic for Applications code when evaluating RUNADDON operands in cell formulas.

By default, the EventsEnabled property is True when an instance of Visio starts.

You may want to disable event firing if you have code behind events such as DocumentOpened or DocumentCreated that does not work properly, or to prevent the incorporation of a virus into a document. Events will not fire until the EventsEnabled property is set to True.

To set the EventsEnabled property to False in another way:

  1. On the Tools menu, click Options.
  1. In the Options dialog box, click the Advanced tab.
  1. Clear the Enable Automation events check box.