Events

The following tables list some of the more useful events for the event procedures for the objects listed in Chapter 10.

Worksheet events

Event name

Description

Worksheet_Activate

Worksheet_BeforeDoubleClick

Worksheet_BeforeRightClick

Worksheet_Calculate

Worksheet_Change

Worksheet_Deactivate

Worksheet_SelectionChange

Occurs when a worksheet is activated Occurs when the user double-clicks on a cell * Occurs when the user right-clicks on a cell * Occurs when a cell on the worksheet is calculated.

Occurs when the value of a cell is changed, not following a change as the result of a calculation.

Occurs when a worksheet is deactivated, or another worksheet is displayed.

Occurs when the selection is moved to a new range.

* A Cancel parameter is provided with this event.

* A Cancel parameter is provided with this event.

Workbook events

Event name

Description

Workbook_Activate

Occurs when the workbook is activated.

Workbook_BeforeClose

Occurs when the workbook is closed. *

Workbook_BeforePrint

Occurs when the workbook is printed. *

Workbook_BeforeSave

Occurs when the workbook is saved. *

Workbook_Deactivate

Occurs when the workbook is deactivated, not when you switch applications.

Workbook_NewSheet

Occurs when a new worksheet is added to the workbook.

Workbook_Open

Occurs when the workbook is opened.

Workbook_SheetActivate

The workbook implementation of the Worksheet_Activate event.

Workbook_SheetBeforeDoubleClick

The workbook implementation of the Worksheet_BeforeDoubleClick event. *

Workbook_SheetBeforeRightClick

The workbook implementation of the Worksheet_BeforeRightClick event. *

Workbook_SheetCalculate

The workbook implementation of the Worksheet_Calculate event.

Workbook_SheetChange

The workbook implementation of the Worksheet_Change event.

Workbook_SheetDeactivate

The workbook implementation of the Worksheet_Deactivate event.

Workbook_SheetSelectionChange

The workbook implementation of the Worksheet_SelectionChange event.

* A Cancel parameter is provided with this event.

* A Cancel parameter is provided with this event.

Chart events

Event name

Description

Chart_Activate

Occurs when the chart sheet is activated.

Chart_BeforeDoubleClick

Occurs when the user double-clicks on the chart sheet. *

Chart_BeforeRightClick

Occurs when the user right-clicks on the chart sheet. *

Chart_Calculate

Occurs when the chart is calculated or an element of the chart is changed.

Chart_Deactivate

Occurs when the chart sheet is deactivated.

Chart_MouseDown

Occurs when the user presses a mouse button while over the chart.

Chart_MouseMove

Occurs when the user moves the mouse over the chart.

Chart_MouseUp

Occurs when the user releases the mouse button.

Chart_Resize

Occurs when the chart is resized.

Chart_Select

Occurs when the user selects the chart.

Chart_SeriesChange

Occurs when the value of a data point is changed.

* A Cancel parameter is provided with this event.

* A Cancel parameter is provided with this event.

Application events

Event name

Description

App_NewWorkbook

Occurs when a new workbook is added.

App_SheetActivate

The Application implementation of the Worksheet_Activate event.

App_SheetBeforeDoubleClick

The Application implementation of the Worksheet_BeforeDoubleClick event. *

App_SheetBeforeRightClick

The Application implementation of the Worksheet_BeforeRightClick event. *

App_SheetCalculate

The Application implementation of the Worksheet_Calculate event.

App_SheetChange

The Application implementation of the Worksheet_Change event.

App_SheetDeactivate

The Application implementation of the Worksheet_Deactivate event.

App_SheetSelectionChange

The Application implementation of the Worksheet_SelectionChange event.

App_WindowActivate

The Application implementation of the Workbook_WindowActivate event.

App_WindowDeactivate

The Application implementation of the Workbook_WindowDeactivate event.

App_WindowResize

The Application implementation of the Workbook_WindowResize event.

App_WorkbookActivate

The Application implementation of the Workbook_Activate event.

App_WorkbookBeforeClose

The Application implementation of the Workbook_BeforeClose event. *

App_WorkbookBeforePrint

The Application implementation of the Workbook_BeforePrint event. *

App_WorkbookBeforeSave

The Application implementation of the Workbook_BeforeSave event. *

App_WorkbookDeactivate

The Application implementation of the Workbook_Deactivate event.

App_WorkbookNewSheet

The Application implementation of the Workbook_NewSheet event.

App_WorkbookOpen

The Application implementation of the Workbook_Open event.

* A Cancel parameter is provided with this event.

* A Cancel parameter is provided with this event.

0 0

Post a comment