Share via


Event.Persistent Property

Visio Automation Reference

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

Version Information
 Version Added:  Visio 4.1

Syntax

expression.Persistent

expression   A variable that represents a 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 Office 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.

ms196220.vs_note(en-us,office.12).gif  Note
Events handled in a Microsoft Visual Basic for Applications (VBA) project are persistent.

See Also