ShrinkToFit Property [Excel 2003 VBA Language Reference]

ShrinkToFit property as it applies to the Style object.

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.

ShrinkToFit 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

Applies to | CellFormat Object | Range Collection | Style Object