Automatic Procedures and Events
Most Excel programmers never need to worry about most of the events in this list. You should, however, at least know that these events exist because they may come in handy someday. Now, I discuss the most com-monly used events. To simplify things, I talk about two types of events: work-book and worksheet.
Table lists most of the workbook-related events. If, for some reason, you need to see the complete list of workbook-related events, you’ll find it in the Help system.
Event
|
When
It’s Triggered
|
|
|
Activate
|
The workbook
is activated.
|
|
|
AddinInstall
|
An add-in is installed (relevant only for add-ins).
|
|
|
AddinUninstall
|
The add-in is
uninstalled (relevant only for
|
|
add-ins).
|
|
|
BeforeClose
|
The workbook
is closed.
|
|
|
BeforePrint
|
The workbook
is printed.
|
|
|
BeforeSave
|
The workbook
is saved.
|
|
|
Deactivate
|
The workbook
is deactivated.
|
|
|
NewSheet
|
A new sheet
is added to the workbook.
|
|
|
Open
|
The workbook
is opened.
|
|
|
SheetActivate
|
A sheet in
the workbook is activated.
|
|
|
SheetBefore
DoubleClick
|
A cell in the
workbook is double-clicked.
|
|
|
SheetBefore
RightClick
|
A cell in the
workbook is right-clicked.
|
|
|
SheetCalculate
|
A sheet in
the workbook is recalculated.
|
|
|
SheetChange
|
A change is
made to a cell in the workbook.
|
|
|
SheetDeactivate
|
A sheet in
the workbook is deactivated.
|
|
|
SheetFollowHyperlink
|
A hyperlink
in a worksheet is clicked.
|
|
|
SheetSelectionChange
|
The selection
is changed.
|
|
|
WindowActivate
|
The workbook
window is activated.
|
|
|
WindowDeactivate
|
The workbook
window is deactivated.
|
|
|
WindowResize
|
The workbook
window is resized.
|
|
|
Event
|
When
It’s Triggered
|
|
|
|
|
Activate
|
The worksheet
is activated.
|
|
|
|
|
BeforeDoubleClick
|
A cell in the
worksheet is double-clicked.
|
|
|
|
|
BeforeRightClick
|
A cell in the
worksheet is right-clicked.
|
|
|
|
|
Calculate
|
The worksheet
is recalculated.
|
|
|
|
|
Change
|
A change is
made to a cell in the
|
|
|
worksheet.
|
|
|
|
|
Deactivate
|
The worksheet
is deactivated.
|
|
|
|
|
FollowHyperlink
|
A hyperlink
is activated.
|
|
|
|
|
SelectionChange
|
The selection
is changed.
|
No comments:
Post a Comment