AutoFit Method

See Also         Example         Applies To

Changes the width of the columns in the range or the height of the rows in the range to achieve the best fit.

Syntax

expression.AutoFit

expression   Required. An expression that returns a Range object. Must be a row or a range of rows, or a column or a range of columns. Otherwise, this method generates an error.

Remarks

One unit of column width is equal to the width of one character in the Normal style.