Syntax

expression.SelectedSheets

expression A variable that represents a Window object.

Example

This example displays a message if Sheet1 is selected in Book1.xls.

Visual Basic for Applications
For Each sh In Workbooks("BOOK1.XLS").Windows(1).SelectedSheets If sh.Name = "Sheet1" Then MsgBox "Sheet1 is selected" Exit For End If Next
Chosen sheets? Find out which sheets are selected? selected selected sheets Selected Sheets Property selectedsheets SelectedSheets Property

See also: