ColPosition, RowPosition Properties

       

Syntax

object.ColPosition(index, number) [= value]
object.RowPosition(number) [= value]

Note   The above ColPosition syntax cannot be used in an MSFlexGrid due to the limitations of this control. If you are using MSFlexGrid, use the syntax: object.ColPosition(number) [= value]

Syntax for the ColPosition and RowPosition properties has these parts:

Part Description
Object An object expression that evaluates to an object in the Applies To list.
index A Long value that specifies the column to be moved.

Note   This is not applicable to the MSFlexGrid.

number A Long value that specifies the band containing the column to be moved. Optional.

Note   In the MSFlexGrid, this is the number of the column or row to be moved.

value Integer. A numeric expression that specifies the new position of the column or row.

Remarks

In the MSHFlexGrid, when BandNumber is not specified, it defaults to 0. Hence, when the grid is not bound to a hierarchical Recordset, using 0 for BandNumber and not specifying BandNumber both have the same result. Note that BandNumber is an optional parameter for backward compatibility with the MSFlexGrid.

The index and setting must correspond to valid row or column numbers (in the range 0 to Rows –1 or Cols –1), otherwise an error is generated.

When a row or column is moved using the RowPosition and ColPosition properties, all formatting information moves with it. This includes width, height, alignment, colors, and font properties. To move text only, use the Clip property.