AutoSize Property

Applies To

Button Object, Buttons Collection, DrawingObjects Collection, GroupObject Object, GroupObjects Collection, TextBox Object, TextBoxes Collection.

Description

True if the object will be automatically resized to fit the text it contains. Read-write.

Remarks

This property is set to False if the object is resized manually (by the user or by the Height or Width properties).

Example

This example sets button one on Sheet1 to automatically size to fit the text it contains.


Worksheets("Sheet1").Buttons(1).AutoSize = True