SheetActivate Event

Applies To

Application object, Workbook object.

Description

Occurs when any sheet is activated.

Syntax

Private Sub object_SheetActivate(ByVal Sh As Object)

object Application or Workbook.

Sh The activated sheet. Can be a Chart or Worksheet object.

See Also

Activate event, Deactivate event, SheetDeactivate event, WindowActivate event, WindowDeactivate event, WorkbookActivate event, WorkbookDeactivate event.

Example

This example displays the name of each activated sheet.

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
    MsgBox Sh.Name
End Sub