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]
Property Selected As Boolean
[C#]
bool Selected { get; set; }
[C++]
__property bool get_Selected();
__property void set_Selected(bool );
[JScript]
function get Selected() : bool
function set Selected(bool);

Property Value

True if the worksheet is selected; otherwise, false.

Example

This example selects the sheet one.

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

See Also

IWorksheet Interface | NativeExcel Namespace | Select Method