NamedRange.Select Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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