Returns or sets the coordinates of the active cell in a Grid. Not available at design time.
object.Col [= number ]
object.Row [= number ]
The Col, Row syntax has these parts:
Part | Description |
---|---|
object | An object expression that evaluates to an object. |
number | Long. A numeric expression specifying the position of the active cell. |
Use these properties to specify a cell in a Grid or to find out which row or column contains the current cell. Columns and rows are numbered from zero, beginning at the top for rows and at the left for columns.
Setting these properties automatically resets RowSel and ColSel, so the selection becomes the current cell. Therefore, to specify a block selection, you must set Row and Col 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.