다음을 통해 공유


NamedRange.Select Method

Definition

Selects the NamedRange control.

public:
 System::Object ^ Select();
public object Select ();
abstract member Select : unit -> obj
Public Function Select () As Object

Returns

Examples

The following code example uses the Select method to select the cells in a NamedRange control that includes the range of cells A1 through E5.

This example is for a document-level customization.

private void SelectNamedRange()
{
    Microsoft.Office.Tools.Excel.NamedRange namedRange1 =
        this.Controls.AddNamedRange(this.Range["A1", "E5"],
        "namedRange1");

    namedRange1.Select();
}
Private Sub SelectNamedRange()
    Dim namedRange1 As Microsoft.Office.Tools.Excel.NamedRange _
        = Me.Controls.AddNamedRange(Me.Range("A1", "E5"), _
        "namedRange1")

    namedRange1.Select()
End Sub

Applies to