Application Events (Excel)

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

AfterCalculate

The AfterCalculate event occurs when all pending refresh activity (both synchronous and asynchronous) and all of the resultant calculation activities have been completed.

NewWorkbook

Occurs when a new workbook is created.

ProtectedViewWindowActivate

Occurs when a Protected View window is activated.

ProtectedViewWindowBeforeClose

Occurs immediately before a Protected View window or a workbook in a Protected View window closes.

ProtectedViewWindowBeforeEdit

Occurs immediately before editing is enabled on the workbook in the specified Protected View window.

ProtectedViewWindowDeactivate

Occurs when a Protected View window is deactivated.

ProtectedViewWindowOpen

Occurs when a workbook is opened in a Protected View window.

ProtectedViewWindowResize

Occurs when any Protected View window is resized.

SheetActivate

Occurs when any sheet is activated.

SheetBeforeDelete

SheetBeforeDoubleClick

Occurs when any worksheet is double-clicked, before the default double-click action.

SheetBeforeRightClick

Occurs when any worksheet is right-clicked, before the default right-click action.

SheetCalculate

Occurs after any worksheet is recalculated or after any changed data is plotted on a chart.

SheetChange

Occurs when cells in any worksheet are changed by the user or by an external link.

SheetDeactivate

Occurs when any sheet is deactivated.

SheetFollowHyperlink

Occurs when you click any hyperlink in Microsoft Excel. For worksheet-level events, see the Help topic for the FollowHyperlink event.

SheetLensGalleryRenderComplete

Occurs after a callout gallery’s icons (dynamic & static) have finished rendering.

SheetPivotTableAfterValueChange

Occurs after a cell or range of cells inside a PivotTable are edited or recalculated (for cells that contain formulas).

SheetPivotTableBeforeAllocateChanges

Occurs before changes are applied to a PivotTable.

SheetPivotTableBeforeCommitChanges

Occurs before changes are committed against the OLAP data source for a PivotTable.

SheetPivotTableBeforeDiscardChanges

Occurs before changes to a PivotTable are discarded.

SheetPivotTableUpdate

Occurs after the sheet of the PivotTable report has been updated.

SheetSelectionChange

Occurs when the selection changes on any worksheet (doesn't occur if the selection is on a chart sheet).

SheetTableUpdate

Occurs when a table on a worksheet is updated.

WindowActivate

Occurs when any workbook window is activated.

WindowDeactivate

Occurs when any workbook window is deactivated.

WindowResize

Occurs when any workbook window is resized.

WorkbookActivate

Occurs when any workbook is activated.

WorkbookAddinInstall

Occurs when a workbook is installed as an add-in.

WorkbookAddinUninstall

Occurs when any add-in workbook is uninstalled.

WorkbookAfterSave

Occurs after the workbook is saved.

WorkbookAfterXmlExport

Occurs after Microsoft Excel saves or exports XML data from the specified workbook.

WorkbookAfterXmlImport

Occurs after an existing XML data connection is refreshed, or new XML data is imported into any open Microsoft Excel workbook.

WorkbookBeforeClose

Occurs immediately before any open workbook closes.

WorkbookBeforePrint

Occurs before any open workbook is printed.

WorkbookBeforeSave

Occurs before any open workbook is saved.

WorkbookBeforeXmlExport

Occurs before Microsoft Excel saves or exports XML data from the specified workbook.

WorkbookBeforeXmlImport

Occurs before an existing XML data connection is refreshed, or new XML data is imported into any open Microsoft Excel workbook.

WorkbookDeactivate

Occurs when any open workbook is deactivated.

WorkbookModelChange

Occurs when the data model is updated.

WorkbookNewChart

Occurs when a new chart is created in any open workbook.

WorkbookNewSheet

Occurs when a new sheet is created in any open workbook.

WorkbookOpen

Occurs when a workbook is opened.

WorkbookPivotTableCloseConnection

Occurs after a PivotTable report connection has been closed.

WorkbookPivotTableOpenConnection

Occurs after a PivotTable report connection has been opened.

WorkbookRowsetComplete

The WorkbookRowsetComplete event occurs when the user either drills through the recordset or invokes the rowset action on an OLAP PivotTable.

WorkbookSync

This object or member has been deprecated, but it remains part of the object model for backward compatibility. You should not use it in new applications.