AutoSize Command

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to auto size a text box using a macro. The text box was created
from the control toolbar if that makes a difference. Microsoft help says the
command is: object.AutoSize = True

They give the example of: TextBox1.AutoSize = True

Here is the portion of my code that I wrote that is currently giving me the
problem:

Selection.Name = "SummScrollingTextBox"
Selection.AutoSize = True

Excel gives the following error:

"Object doesn't support this property or method"

Any ideas? Thanks.
 
Try fully qualifying the textbox.

frmName.textboxname.autosize=true
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Excel 2007 Text Box 10
Autosize 2
TextBox with Fixed Width and Autosized Height 4
wrong font 4
Command Button Properties 2
Legnth of text in textbox control 3
Autosizing labels Excel 97 2
Listbox autosize? 1

Back
Top