Application Events (Visio)

GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

This object has the following events:

Events

Name

Description

AfterModal

Occurs after the Microsoft Visio instance leaves a modal state.

AfterRemoveHiddenInformation

Occurs when hidden information is removed from the document.

AfterReplaceShapes

Occurs after a shape-replacement operation.

AfterResume

Occurs when the operating system resumes normal operation after having been suspended.

AfterResumeEvents

Occurs after firing of events is resumed.

AppActivated

Occurs after a Microsoft Visio instance becomes active.

AppDeactivated

Occurs after a Microsoft Visio instance becomes inactive.

AppObjActivated

Occurs after a Microsoft Visio instance becomes active.

AppObjDeactivated

Occurs after a Microsoft Visio instance becomes inactive.

BeforeDataRecordsetDelete

Occurs before a DataRecordset object is deleted from the DataRecordsets collection.

BeforeDocumentClose

Occurs before a document is closed.

BeforeDocumentSave

Occurs before a document is saved.

BeforeDocumentSaveAs

Occurs just before a document is saved by using the Save As command.

BeforeMasterDelete

Occurs before a master is deleted from a document.

BeforeModal

Occurs before a Microsoft Visio instance enters a modal state.

BeforePageDelete

Occurs before a page is deleted.

BeforeQuit

Occurs before a Microsoft Visio instance terminates.

BeforeReplaceShapes

Occurs just before a shape-replacement operation.

BeforeSelectionDelete

Occurs before selected objects are deleted.

BeforeShapeDelete

Occurs before a shape is deleted.

BeforeShapeTextEdit

Occurs before a shape is opened for text editing in the user interface.

BeforeStyleDelete

Occurs before a style is deleted.

BeforeSuspend

Occurs before the operating system enters a suspended state.

BeforeSuspendEvents

Occurs before firing of events is suspended.

BeforeWindowClosed

Occurs before a window is closed.

BeforeWindowPageTurn

Occurs before a window is about to show a different page.

BeforeWindowSelDelete

Occurs before the shapes in the selection of a window are deleted.

CalloutRelationshipAdded

Occurs when a new callout relationship is added to the application.

CalloutRelationshipDeleted

Occurs when a callout relationship is deleted from the application.

CellChanged

Occurs after the value changes in a cell in a document.

ConnectionsAdded

Occurs after connections have been established between shapes.

ConnectionsDeleted

Occurs after connections between shapes have been removed.

ContainerRelationshipAdded

Occurs when a new container relationship is added to the document.

ContainerRelationshipDeleted

Occurs when a container relationship is deleted from the document.

ConvertToGroupCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelConvertToGroup event.

DataRecordsetAdded

Occurs when a DataRecordset object is added to a DataRecordsets collection.

DataRecordsetChanged

Occurs when a data recordset changes as a result of being refreshed.

DesignModeEntered

Occurs before a document enters design mode.

DocumentChanged

Occurs after certain properties of a document are changed.

DocumentCloseCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelDocumentClose event.

DocumentCreated

Occurs after a document is created.

DocumentOpened

Occurs after a document is opened.

DocumentSaved

Occurs after a document is saved.

DocumentSavedAs

Occurs after a document is saved by using the Save As command.

EnterScope

Queued when an internal command begins, or when an Automation client opens a scope by using the BeginUndoScope method.

ExitScope

Queued when an internal command ends, or when an Automation client exits a scope by using the EndUndoScope method.

FormulaChanged

Occurs after a formula changes in a cell in the object that receives the event.

GroupCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelGroup event.

KeyDown

Occurs when a keyboard key is pressed.

KeyPress

Occurs when a keyboard key is pressed.

KeyUp

Occurs when a keyboard key is released.

MarkerEvent

Caused by calling the QueueMarkerEvent method.

MasterAdded

Occurs after a new master is added to a document.

MasterChanged

Occurs after properties of a master are changed and propagated to its instances.

MasterDeleteCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelMasterDelete event.

MouseDown

Occurs when a mouse button is clicked.

MouseMove

Occurs when the mouse is moved.

MouseUp

Occurs when a mouse button is released.

MustFlushScopeBeginning

Occurs before the Microsoft Visio instance is forced to flush its event queue.

MustFlushScopeEnded

Occurs after the Microsoft Visio instance is forced to flush its event queue.

NoEventsPending

Occurs after the Microsoft Visio instance flushes its event queue.

OnKeystrokeMessageForAddon

Occurs when Microsoft Visio receives a keystroke message from Microsoft Windows that is targeted at an add-on window or child of an add-on window.

PageAdded

Occurs after a new page is added to a document.

PageChanged

Occurs after the name of a page, the background page associated with a page, or the page type (foreground or background) changes.

PageDeleteCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelPageDelete event.

QueryCancelConvertToGroup

Occurs before the application converts a selection of shapes to a group in response to a user action in the interface. If any event handler returns True, the operation is canceled.

QueryCancelDocumentClose

Occurs before the application closes a document in response to a user action in the interface. If any event handler returns True, the operation is canceled.

QueryCancelGroup

Occurs before the application groups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.

QueryCancelMasterDelete

Occurs before the application deletes a master in response to a user action in the interface. If any event handler returns True, the operation is canceled.

QueryCancelPageDelete

Occurs before the application deletes a page in response to a user action in the interface. If any event handler returns True, the operation is canceled.

QueryCancelQuit

Occurs before the application terminates in response to a user action in the interface. If any event handler returns True, the operation is canceled.

QueryCancelReplaceShapes

Occurs immediately after a shape-replacement operation is requested. If any event handler returns True, the operation is canceled.

QueryCancelSelectionDelete

Occurs before the application deletes a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.

QueryCancelStyleDelete

Occurs before the application deletes a style in response to a user action in the interface. If any event handler returns True, the operation is canceled.

QueryCancelSuspend

Occurs before the operating system enters a suspended state. If any event handler returns True, the Microsoft Visio instance will deny the operating system's request.

QueryCancelSuspendEvents

Occurs before the application suspends events in response to client code. If any event handler returns True, the operation is canceled.

QueryCancelUngroup

Occurs before the application ungroups a selection of shapes in response to a user action in the interface. If any event handler returns True, the operation is canceled.

QueryCancelWindowClose

Occurs before the application closes a window in response to a user action in the interface. If any event handler returns True, the operation is canceled.

QuitCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelQuit event.

ReplaceShapesCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelReplaceShapes event.

RuleSetValidated

Occurs when a rule set is validated.

RunModeEntered

Occurs after a document enters run mode.

SelectionAdded

Occurs after one or more shapes are added to a document.

SelectionChanged

Occurs after a set of shapes selected in a window changes.

SelectionDeleteCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelSelectionDelete event.

ShapeAdded

Occurs after one or more shapes are added to a document.

ShapeChanged

Occurs after a property of a shape that is not stored in a cell is changed in a document.

ShapeDataGraphicChanged

Occurs after a data graphic is applied to or deleted from a shape.

ShapeExitedTextEdit

Occurs after a shape is no longer open for interactive text editing.

ShapeLinkAdded

Occurs after a shape is linked to a data row.

ShapeLinkDeleted

Occurs after the link between a shape and a data row is deleted.

ShapeParentChanged

Occurs after shapes are grouped or a group is ungrouped.

StyleAdded

Occurs after a new style is added to a document.

StyleChanged

Occurs after the name of a style is changed or a change to the style propagates to objects to which the style is applied.

StyleDeleteCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelStyleDelete event.

SuspendCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelSuspend event.

SuspendEventsCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelSuspendEvents event. .

TextChanged

Occurs after the text of a shape is changed in a document.

UngroupCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelUngroup event.

ViewChanged

Occurs when the zoom level or scroll position of a drawing window changes.

VisioIsIdle

Occurs after the application empties its message queue.

WindowActivated

Occurs after the active window changes in a Microsoft Visio instance.

WindowChanged

Occurs when the size or position of a window changes.

WindowCloseCanceled

Occurs after an event handler has returned True (cancel) to a QueryCancelWindowClose event.

WindowOpened

Occurs after a window is opened.

WindowTurnedToPage

Occurs after a window shows a different page.