ID: Q161761
The information in this article applies to:
This article includes a summary of Visual Basic for Applications workbook and worksheet events and each corresponding command used in previous versions of Microsoft Excel.
Previous Version
Event Name Equivalent Description of when Event Fires
----------------- ----------------- --------------------------------
Activate Auto_Activate When the active workbook changes
from another workbook to this
workbook.
Deactivate Auto_Deactivate When the active workbook changes
from this workbook to another
workbook.
Open Auto_Open When the workbook opens.
BeforeClose Auto_Close Before the workbook closes.
AddInInstall Auto_Add When the user Installs the Add-In
via the Add-In manager.
AddInUninstall Auto_Remove When the User Uninstalls the Add-In
via the Add-In manager.
WindowResize N/A After a window of the Workbook has
been opened, resized, maximized, or
minimized.
WindowActivate OnWindow Every time the focus comes to a
Window belonging to the Workbook.
WindowDeactivate OnWindow Every time the focus leaves this
particular window of the Workbook.
BeforeSave OnSave Before a workbook saves.
BeforePrint N/A Before a workbook prints.
NewSheet N/A After a new sheet is created.
SheetActivate OnSheetActivate Every time a Sheet is activated in
the Workbook.
SheetDeactivate OnSheetDeactivate After a Sheet is deactivated in the
Workbook.
SheetCalculate OnCalculate After any recalculation in the
Workbook.
SheetBefore
DoubleClick OnDoubleClick When a worksheet cell is double-
clicked.
SheetSelection
Change N/A When there's any change in cell
selection on a particular sheet.
SheetBefore
RightClick N/A When a worksheet cell is right-
clicked.
SheetChange OnEntry When a user changes the formula
of a cell by typing, copy or paste,
drag or drop, or undo.
Previous Version
Event Name Equivalent Description of when Event Fires
----------------- ----------------- -------------------------------
Activate OnSheetActivate When the active sheet changes
from another sheet to this sheet.
Deactivate OnSheetDeactivate After the active sheet changes from
this sheet to another sheet. Fires
before the activated sheet displays.
Calculate OnCalculate After every recalculation of this
sheet.
BeforeDoubleClick OnDoubleClick When a worksheet cell is double-
clicked.
SelectionChange N/A When a worksheet cell is clicked.
BeforeRightClick N/A When a worksheet cell is
right-clicked.
Change OnEntry When a user changes the formula
of a cell by typing, copy or paste,
drag or drop, or undo.
For more information about workbook or worksheet events, click the Index tab in Visual Basic Help, type the following text
events
and then double-click the selected text to go to the event procedures
topic.
Additional query words: 97 8.00 XL97
Keywords : kbdta KbVBA
Version : WINDOWS:97
Platform : WINDOWS
Last Reviewed: January 1, 1999