Visual Basic: MSFlexGrid/MSHFlexGrid Controls
- Cols Returns or sets the total number of columns in an MSHFlexGrid.
- Rows Returns or sets the total number of rows in an MSHFlexGrid.
Note The MSFlexGrid contains no bands. If using the Rows property programmatically in the MSFlexGrid, you can only return or set the total number of columns or rows. Also, the Rows syntax, below, cannot be used in an MSFlexGrid due to the limitations of this control. If you are using MSFlexGrid, use the syntax: object.Rows [= value].
object.Cols(BandNumber) [= value]
object.Rows [= value]
Syntax for the Cols and Rows properties has these parts:
|object||An object expression that evaluates to an object in the Applies To list.|
|BandNumber||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.|
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.