Workbook.SheetActivate event (Excel)

Occurs when any sheet is activated.


expression.SheetActivate (Sh)

expression An expression that returns a Workbook object.


Name Required/Optional Data type Description
Sh Required Object The activated sheet. Can be a Chart or Worksheet object.


This example displays the name of each activated sheet.

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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.