Microsoft KB Archive/161761

= XL97: Summary of Workbook and Worksheet Application Events =

Article ID: 161761

Article Last Modified on 7/31/2001

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition

-



This article was previously published under Q161761



For a Microsoft Excel 2002 version of this article, see 291294.

For a Microsoft Excel 2000 version of this article, see 213220.



SUMMARY
This article includes a summary of Visual Basic for Applications workbook and worksheet events and each corresponding command that is used in previous versions of Microsoft Excel.



Workbook Events
                   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. SetLinkOnData     OnData             When a DDE link is updated.

Worksheet Events
                   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.

