Expand Minimize

WorksheetBase.Select Method

Selects the worksheet.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

public void Select(
	Object replace
)

Parameters

replace
Type: System.Object

true to remove the current selection and select the worksheet instead; false to extend the current selection to include any previously selected objects and the worksheet.

Optional Parameters

For information on optional parameters, see Optional Parameters in Office Solutions.

The following code example uses the Select method to select Sheet1, and then extends the selection to include Sheet2 and Sheet3.

This example is for a document-level customization.

private void SelectWorksheets()
{
    Globals.Sheet1.Select(true);
    Globals.Sheet2.Select(false);
    Globals.Sheet3.Select(false);
}

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft