Visual Basic in Excel, Resize the Cell automatically

P

Pam

How do I automatically resize a cell in Visual Basic depending on the amount
of text I enter?
 
M

Mike H

Pam,

It depends on what you want to do. Like this

Range("A1").Value = "antidisestablishmentarianism"
With Range("A1")
.WrapText = True
End With

or like this

Range("A1").Value = "antidisestablishmentarianism"
Columns("A:A").EntireColumn.AutoFit

Mike
 

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

Top