Skip to main content

Range.ShrinkToFit property

Table of contents
  1. Syntax
  2. Remarks
  3. Example

Returns or sets a Variant value that indicates if text automatically shrinks to fit in the available column width.

Syntax

expression.ShrinkToFit

expression A variable that represents a Range object.

Remarks

This property returns True if text automatically shrinks to fit in the available column width, or Null if this property isn't set to the same value for all cells in the specified range.

Example

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

Rows(1).ShrinkToFit = True

Leave a comment

Your email address will not be published. Required fields are marked *

Format your code: <pre><code class="language-vba">place your code here</code></pre>