Can you get a Merged Cell with Text Wrap to Autofit?

J

jennie

Hi,

Here is the problem:
Cells A1:A15 form a range called TheRange, they are a set of merge
cells.

I want the text that is imputed into TheRange from the Userform to hav
text wrap on and then autofit the row.
However this does not seem to work with the merged range - the tex
wrap is on but the autofit doesn't fit the row so all the text can b
seen, only the top row of text can be seen in effect.
To get all the text to be seen I have to go and change the row height
manually, this is not an option as it should all be an automati
process - and I can not hard code the row heights in as I don't kno
how much text there will be each time.

This is the code I am currently using after the text has been entere
into TheRange:

w is the worksheet

With w.Range(TheRange)
.TextWrap = True
.EntireRow.AutoFit
End With

Any help / suggestions would be great
Thanks a lot
Jenni
 

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