Help Center

RowSelproperty

Returns or sets the start or end row for a range of cells.

Windowspropertydoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

PROPERTY RowSel () AS LONG
PROPERTY RowSel (BYVAL nRow AS LONG)

Parameters

NameDescription
nRowA Long value that specifies the start or end row for a range of cells.

Description

Returns or sets the start or end row for a range of cells.

Remarks

RowSel works in conjunction with the Row property to define a vertical selection block. The selection spans from the row index specified by Row to the row index specified by RowSel.

Whenever you set the Row and Col properties, RowSel and ColSel are automatically reset, so the cursor becomes the current selection. To select a block of cells from code, you must first set the Row and Col properties, and then set RowSel and ColSel. Note that RowSel may be above or below Row, and ColSel may be to the left or to the right of Col.

Example

grid.Row = 1 ' Set the starting row of the selection grid.RowSel = 10 ' Extend the selection to the ending row

Reference