NamedRange.Select Method
Selects the NamedRange control.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Syntax
'Declaration
Function Select As Object
Object Select()
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.