ColSel, RowSel

Returns or sets the starting or ending row or column for a range of cells. Not available at design time.

Syntax

object.ColSel [= value ]

object.RowSel [= value ]

The ColSel, RowSel properties syntax has these parts:

Part Description
object An object expression that evaluates to an object.
value Long. A numeric expression specifying the starting or ending row or column for a range of cells.

Remarks

You can use these properties to select a specific region of Grid from code, or to read into code the dimensions of an area that the user selects.

The Grid cursor is the cell at Row, Col. The Grid selection is the region between rows Row and RowSel and columns Col and ColSel. Note that RowSel may be above or below Row, and ColSel may be to the left or to the right of Col.

Whenever you set the Row and Col properties, RowSel and ColSel are automatically reset so the cursor becomes the current selection. If you want to select a block of cells from code, you must set the Row and Col properties first, then set RowSel and ColSel.