ColWidth

This property returns and sets the width, in twips, of the specified column.

Syntax

object.ColWidth(number) [= value]

Parameters

object
Object expression that evaluates to a Grid control.
number
Long. Number of the column in the Grid control, or –1 to set all columns at once.
value
Numeric expression that specifies the width, in twips, of the specified column.

Remarks

The ColWidth property is unavailable at design time.

You can use this property to set the width of any column at run time. You can set ColWidth to 0 to create invisible columns, or to –1 to reset the column width to its default value, which depends on the size of the current font.