Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

XL2000: Summary of Workbook and Worksheet Application Events


View products that this article applies to.

This article was previously published under Q213220
For a Microsoft Excel 2002 version of this article, see 291294 (http://support.microsoft.com/kb/291294/EN-US/ ) .
For a Microsoft Excel 97 version of this article, see 161761 (http://support.microsoft.com/kb/161761/EN-US/ ) .

↑ Back to the top


Summary

This article includes a summary of Visual Basic for Applications workbook and worksheet events and each corresponding command used in versions of Microsoft Excel earlier than Microsoft Excel 97.

↑ Back to the top


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
                                         through the add-in manager.

   AddInUninstall     Auto_Remove        When the user uninstalls the 
                                         add-in through 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 is saved.

   BeforePrint        N/A                Before a workbook is printed.

   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        OnDoubleClick      When a worksheet cell is double-
   DoubleClick                           clicked.
                                         
   SheetSelection     N/A                When there is any change in cell
   Change                                selection on a particular sheet.
                                         
   SheetBefore        N/A                When a worksheet cell is right-
   RightClick         N/A                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 
                                         is displayed.

   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.
				

↑ Back to the top


References

For more information about workbook events, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type workbook object events in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

For more information about worksheet events, in the Visual Basic Editor, click Microsoft Visual Basic Help on the Help menu, type worksheet object events in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

↑ Back to the top


Keywords: KB213220, kbinfo, kbhowto

↑ Back to the top

Article Info
Article ID : 213220
Revision : 6
Created on : 10/11/2006
Published on : 10/11/2006
Exists online : False
Views : 244