Row

This property returns and sets the coordinates of the active cell in a Grid control.

Syntax

grid.Row [= number]

Parameters

grid
Object expression that evaluates to an Grid control.
number
Long. Numeric expression that specifies the position of the active cell.

Remarks

The Row property is unavailable at design time.

Use this property to specify a cell in a Grid control or to find out which row or column contains the current cell. Columns and rows are numbered from 0, beginning at the top for rows and at the left for columns.

Setting the Row and Col properties automatically resets RowSel and ColSel properties, so the selection becomes the current cell. Therefore, to specify a block selection, you must set Row and Col properties first, then set RowSel and ColSel.

The value of the current cell, defined by the Col and Row settings, is the text contained in that cell. To modify a cell's value without changing the selected Row and Col properties, use the TextMatrix property.

When a Grid is empty, Row is 0.