NativeExcel for .Net Developer's Reference

IWorksheet.Selected Property

Gets or sets a value that indicates whether or not the worksheet is selected.

[Visual Basic]
PropertySelectedAsBoolean
[C#]
boolSelected{get;set;}
[C++]
__propertyboolget_Selected();
__propertyvoidset_Selected(bool);
[JScript]
functiongetSelected():bool
functionsetSelected(bool);

Property Value

True if the worksheet is selected; otherwise, false.

Example

This example selects the sheet one.

[C#]
book.Worksheets[1].Selected = true;
[VisualBasic]
book.Worksheets(1).Selected = True
[C++]
book->Worksheets->Item[1]->Selected = true;

See Also

IWorksheet Interface | NativeExcel Namespace | Select Method