Udostępnij za pośrednictwem


NamedRange.Select Method (2007 System)

Selects the NamedRange control.

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

Syntax

'Declaration
Public Function Select As Object
'Usage
Dim instance As NamedRange 
Dim returnValue As Object 

returnValue = instance.Select()
public Object Select()
public:
Object^ Select()
public function Select() : Object

Return Value

Type: System.Object

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 Sub SelectNamedRange()
    Dim namedRange1 As Microsoft.Office.Tools.Excel.NamedRange _
        = Me.Controls.AddNamedRange(Me.Range("A1", "E5"), _
        "namedRange1")

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

    namedRange1.Select();
}

.NET Framework Security

See Also

Reference

NamedRange Class

NamedRange Members

Microsoft.Office.Tools.Excel Namespace