Microsoft Office Tutorials and References
In Depth Information
Examples of Common Workbook Events
For convenience, just as with selecting worksheet-level event names, VBA will
place the complete workbook-level event statement, with all its arguments and
the accompanying End Sub statement, when you select a workbook-level event
name from the Procedure field.
ExAMplEs of coMMon WorkBook EVEnTs
At the workbook level, Excel version 2003 has 28 events, and 8 more than that (mostly associated
with pivot tables) for a total of 36 in versions 2007 and 2010. The most commonly used
workbooklevel events are listed here, with examples of each on the following pages:
Workbook_Open
Workbook_BeforeClose
Workbook_Activate
Workbook_Deactivate
Workbook_SheetChange
Workbook_SheetSelectionChange
Workbook_SheetBeforeDoubleClick
Workbook_SheetBeforeRightClick
Workbook_SheetPivotTableUpdate
Workbook_NewSheet
Workbook_BeforePrint
Workbook_SheetActivate
Workbook_SheetDeactivate
Workbook_BeforeSave
Workbook_open Event
The Workbook_Open event is triggered when the workbook opens, and is among the most
popular and useful of all workbook-level events. The Workbook_Open event is perfect for such tasks as
informing users about important features of your workbook, or generating a running list of users
who have accessed the workbook, or establishing a particular format setting that would be reset to
its original state with the Workbook_BeforeClose event.
Perhaps the users of your workbook would benefit from the Analysis ToolPak add-ins to be installed
for their Excel work. You can use the Workbook_Open event to verify if the Analysis ToolPak is
 
Search JabSto ::




Custom Search