ShrinkToFit Property

Microsoft Excel Visual Basic

True if text automatically shrinks to fit in the available column width. Read/write Boolean.

expression.ShrinkToFit

expression    Required. An expression that returns a Style object.

ShowShrinkToFit property as it applies to the CellFormat and Range objects.

True if text automatically shrinks to fit in the available column width. Returns Null if this property isn’t set to the same value for all cells in the specified range. Read/write Variant.

expression.ShrinkToFit

expression    Required. An expression that returns one of the above objects.

Example

This example causes text in row one to automatically shrink to fit in the available column width.

Rows(1).ShrinkToFit = True