Export (0) Print
Expand All
Expand Minimize

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.

https://msdn.microsoft.com/en-us/library/aa142049(v=office.10) See also         https://msdn.microsoft.com/en-us/library/aa155644(v=office.10) Example         https://msdn.microsoft.com/en-us/library/aa164022(v=office.10) Applies to

Determines whether a Microsoft Visio instance fires events.

Version added

4.5

Syntax

intRet = object.EventsEnabled
object.EventsEnabled = intExpression

intRet

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

object

Required. An expression that returns an Application object.

intExpression

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

Remarks

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.
Show:
© 2015 Microsoft