ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can you get a Merged Cell with Text Wrap to Autofit? (https://www.excelbanter.com/excel-programming/311302-can-you-get-merged-cell-text-wrap-autofit.html)

jennie

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

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

--
jenni
-----------------------------------------------------------------------
jennie's Profile: http://www.excelforum.com/member.php...nfo&userid=670
View this thread: http://www.excelforum.com/showthread.php?threadid=26313


Bob Umlas

Can you get a Merged Cell with Text Wrap to Autofit?
 
Try changine
TextWrap = True

to
..Wraptext = true

"jennie" wrote in message
...

Hi,

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

I want the text that is imputed into TheRange from the Userform to have
text wrap on and then autofit the row.
However this does not seem to work with the merged range - the text
wrap is on but the autofit doesn't fit the row so all the text can be
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 heights
manually, this is not an option as it should all be an automatic
process - and I can not hard code the row heights in as I don't know
how much text there will be each time.

This is the code I am currently using after the text has been entered
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
Jennie


--
jennie
------------------------------------------------------------------------
jennie's Profile:
http://www.excelforum.com/member.php...fo&userid=6706
View this thread: http://www.excelforum.com/showthread...hreadid=263131




Norman Jones

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

See this post from Jim Rech:

http://tinyurl.com/4mdf2


---
Regards,
Norman



"jennie" wrote in message
...

Hi,

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

I want the text that is imputed into TheRange from the Userform to have
text wrap on and then autofit the row.
However this does not seem to work with the merged range - the text
wrap is on but the autofit doesn't fit the row so all the text can be
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 heights
manually, this is not an option as it should all be an automatic
process - and I can not hard code the row heights in as I don't know
how much text there will be each time.

This is the code I am currently using after the text has been entered
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
Jennie


--
jennie
------------------------------------------------------------------------
jennie's Profile:
http://www.excelforum.com/member.php...fo&userid=6706
View this thread: http://www.excelforum.com/showthread...hreadid=263131




Norman Jones

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

I inadvertently sent the wrong link!

Try this one:

http://tinyurl.com/4c5l6

---
Regards,
Norman



"jennie" wrote in message
...

Hi,

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

I want the text that is imputed into TheRange from the Userform to have
text wrap on and then autofit the row.
However this does not seem to work with the merged range - the text
wrap is on but the autofit doesn't fit the row so all the text can be
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 heights
manually, this is not an option as it should all be an automatic
process - and I can not hard code the row heights in as I don't know
how much text there will be each time.

This is the code I am currently using after the text has been entered
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
Jennie


--
jennie
------------------------------------------------------------------------
jennie's Profile:
http://www.excelforum.com/member.php...fo&userid=6706
View this thread: http://www.excelforum.com/showthread...hreadid=263131





All times are GMT +1. The time now is 05:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com