NamedRange::End Property
Gets a Microsoft.Office.Interop.Excel::Range that represents the cell at the end of the region that contains the NamedRange control.
Assembly: Microsoft.Office.Tools.Excel (in Microsoft.Office.Tools.Excel.dll)
Parameters
- Direction
One of the XlDirection values. The direction in which to move.
Property Value
Type: Microsoft.Office.Tools.Excel::NamedRange_EndType^A Microsoft.Office.Interop.Excel::Range that represents the cell at the end of the region that contains the NamedRange control.
The End property is intended to be used with the following parameter.
Parameter | Description |
|---|---|
Direction | One of the XlDirection values that indicates the direction in which to find the last cell. |
If you attempt to use End without specifying any parameters, End will get a NamedRange_EndType object that is part of the Visual Studio infrastructure and is not intended to be used directly from your code.
This property is equivalent to pressing END+UP ARROW, END+DOWN ARROW, END+LEFT ARROW, or END+RIGHT ARROW.
The following code example creates a NamedRange and then populates a cell to the right to create a boundary for the region of blank columns. It then displays a message box asking if you want to select the end of the region to the right of the NamedRange.
This version is for a document-level customization.
This version is for an application-level add-in.