Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

WorksheetBase.Select Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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);
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.