ColSel

This property returns and sets the starting or ending column for a range of selected cells.

Syntax

object.ColSel [= value]

Parameters

object
Object expression that evaluates to a Grid control.
value
Long. Numeric expression that specifies the starting or ending column for a range of selected cells.

Remarks

The ColSel property is unavailable at design time.

You can use this property to select a specific region of the Grid control from code or to read into code the dimensions of an area that a 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. ColSel may be to the left or to the right of Col.

Whenever you set the Col property, ColSel automatically resets so that the cursor becomes the current selection. If you want to select a block of cells from code, you must set the Col property first, then set ColSel.