XL97: Summary of Workbook and Worksheet Application Events

Last reviewed: February 27, 1998
Article ID: Q161761
The information in this article applies to:
  • Microsoft Excel 97 for Windows

SUMMARY

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.

MORE INFORMATION

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.

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.

REFERENCES

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 : xlvbainfo
Version : WINDOWS:97
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 27, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.