Cols

This property returns and sets the total number of columns in a Grid control.

Syntax

object.Cols [= value]

Parameters

object
Object expression that evaluates to a Grid control.
value
Long. Numeric expression that specifies the number of columns.

Remarks

You can use this property to expand and shrink a Grid control dynamically at run time.

The minimum number of columns is 0. The maximum number is limited by the memory available on your computer.

The value of Cols must be at least one greater than the value of FixedCols, unless they are both set to 0.