Compartilhar via


WorksheetBase.Select(Object) Method

Definition

Selects the worksheet.

public void Select (object replace);
member this.Select : obj -> unit
Public Sub Select (Optional replace As Object)

Parameters

replace
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.

Examples

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);
}
Private Sub SelectWorksheets()
    Globals.Sheet1.Select(True)
    Globals.Sheet2.Select(False)
    Globals.Sheet3.Select(False)
End Sub

Remarks

Optional Parameters

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

Applies to