ColPosition

This property sets the position of a Grid column, enabling you to move a column to a specific position.

Syntax

object.ColPosition(number) [= value]

Parameters

object
Object expression that evaluates to a Grid control.
number
Long. Number of the column to be moved.
value
Integer. Numeric expression that specifies the new position of the column.

Remarks

The ColPosition property is write-only. The Grid control index and setting must correspond to valid column numbers. The value must be in the range from 0 to the value of Cols –1 or an error occurs.

When you move columns with this property, all formatting information moves with them, including width, height, alignment, colors, fonts, and so on. To move text only, use the Clip property.