Muokkaa

Jaa


Event.Persistent property (Visio)

Determines whether an event persists with its document. Read/write.

Syntax

expression. Persistent

expression A variable that represents an Event object.

Return value

Integer

Remarks

An event is persistable if its action code is visActCodeRunAddon and the event's source object is capable of containing persistent events.

When an event is first created, its Persistent property is set to the same value as its Persistable property; if an event can persist, Microsoft Visio assumes it should persist. You can change the initial setting for a persistable event by setting its Persistent property to False. However, you cannot change the Persistent property of a nonpersistable event—attempting to do so causes an exception.

A nonpersistent event exists as long as a reference is held on the Event object, the EventList object that contains the Event object, or the source object that has the EventList object. When the last reference to any of these objects is released, the nonpersistent event ceases to exist.

A persistent event exists until its Event object is deleted from the source object's EventList collection.

Note

Events handled in a Microsoft Visual Basic for Applications (VBA) project are persistent.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.