NativeExcel2 for .Net Developer's Reference

IWorksheet.SelectMethod(Boolean)

Selects the specified worksheet.

[Visual Basic]
SubSelect(_
ByValReplaceAsBoolean_
)
[C#]
voidSelect(
boolReplace
);
[C++]
voidSelect(
boolReplace
);
[JScript]
functionSelect(
boolReplace
);

Parameters

Replace
True if you want to deselect previously selected worksheets; otherwise, false.

Example

This example selects the worksheets "Sheet1" and "Sheet3".

[C#]
book.Worksheets["Sheet1"].Select(true); 
book.Worksheets["Sheet3"].Select(false); 
[VisualBasic]
book.Worksheets("Sheet1").Select(True)
book.Worksheets("Sheet3").Select(False)
[C++]
book->Worksheets->Item[S"Sheet1"]->Select(true);
book->Worksheets->Item[S"Sheet3"]->Select(false);

See Also

IWorksheet Interface | NativeExcel Namespace | IWorksheet.Select Overload List | Selected Property | Activate Method