Workbook.SheetActivate Event (Excel)
Occurs when any sheet is activated.
Syntax
expression .SheetActivate(Sh )
expression An expression that returns a Workbook object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Sh |
Required |
Object |
Example
This example displays the name of each activated sheet.
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
MsgBox Sh.Name
End Sub