NamedRange.Row Property
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.
Gets the number of the first row of the first area in the NamedRange control.
public:
property int Row { int get(); };
public int Row { get; }
member this.Row : int
Public ReadOnly Property Row As Integer
Property Value
The number of the first row of the first area in the NamedRange control.
Examples
The following code example creates a NamedRange and uses the Column and Row properties to display the numbers of the first column and row in the NamedRange.
This example is for a document-level customization.
Microsoft.Office.Tools.Excel.NamedRange columnAndRowRange;
private void DisplayColumnAndRow()
{
columnAndRowRange = this.Controls.AddNamedRange(
this.Range["A3", "D6"], "columnAndRowRange");
MessageBox.Show("The first column in the range is column " +
this.columnAndRowRange.Column.ToString() +
" and the first row is " +
this.columnAndRowRange.Row.ToString());
}
Private columnAndRowRange As Microsoft.Office.Tools.Excel.NamedRange
Private Sub DisplayColumnAndRow()
columnAndRowRange = Me.Controls.AddNamedRange( _
Me.Range("A3", "D6"), "columnAndRowRange")
MessageBox.Show("The first column in the range is column " & _
Me.columnAndRowRange.Column.ToString() & _
" and the first row is " & _
Me.columnAndRowRange.Row.ToString())
End Sub