Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Workbook.SheetSelectionChange Event

Office 2007
Occurs when the selection changes on any worksheet (doesn't occur if the selection is on a chart sheet).


expression.SheetSelectionChange(Sh, Target)

expression   An expression that returns a Workbook object.


NameRequired/OptionalData TypeDescription
ShRequiredObjectThe worksheet that contains the new selection.
TargetRequiredRangeThe new selected range.


This example displays the sheet name and address of the selected range in the status bar.

Visual Basic for Applications
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, _
        ByVal Target As Excel.Range)
    Application.StatusBar = Sh.Name & ":" & Target.Address
End Sub

Community Additions

© 2015 Microsoft