Cols, Rows Properties (MSHFlexGrid)

       

Syntax

object.Cols [= value]
object.Rows(number) [= value]

Syntax for the Cols and Rows properties has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
number A Long value that either specifies the band to get or sets the total number of columns. Optional.

Note   This is not applicable to the MSFlexGrid.

value A Long value that specifies the number of columns or rows.

Remarks

You can use these properties to expand and shrink MSHFlexGrid dynamically at run time.

The minimum number of rows and 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 zero. The value of Rows must be at least one greater than the value of FixedRows, unless they are both set to zero.

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