![]() |
Text wrapping
I have a Userform which deposits some text into a cell. My problem is the it
the text is to long for the cell the text wraps but the row height does no adjust to display all the text. |
Text wrapping
How about autofitting the row after you've populated the cell?
with somecellreferencehere .value = me.textbox1.value .wraptext = true .entirerow.autofit end with "Patrick C. Simonds" wrote: I have a Userform which deposits some text into a cell. My problem is the it the text is to long for the cell the text wraps but the row height does no adjust to display all the text. -- Dave Peterson |
Text wrapping
Private Sub CommandButton1_Click() With Range("A1") .Value = Me.TextBox1.Text .WrapText = True .Rows.AutoFit End With End Sub -- mdmackillop ------------------------------------------------------------------------ mdmackillop's Profile: http://www.thecodecage.com/forumz/member.php?userid=113 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=69267 |
Text wrapping
You can use VBA. After the text is entered in the cell by your userform,
select that cell, then use .EntireRow.AutoFit to make Excel resize the row. For example, if the text was in A10: Range("A10").Select Selection.EntireRow.AutoFit If the text is longer than 1024 characters, Excel won't display all of it in the cell. Also, the AutoFit method won't work if the cell is a merged cell. Hope this helps, Hutch "Patrick C. Simonds" wrote: I have a Userform which deposits some text into a cell. My problem is the it the text is to long for the cell the text wraps but the row height does no adjust to display all the text. |
Text wrapping
And the difference is? -- mdmackillop ------------------------------------------------------------------------ mdmackillop's Profile: http://www.thecodecage.com/forumz/member.php?userid=113 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=69267 |
Text wrapping
Between your suggestion and mine?
Yours was posted 4 minutes after mine. And your leading dots were lost in the post. mdmackillop wrote: And the difference is? -- mdmackillop ------------------------------------------------------------------------ mdmackillop's Profile: http://www.thecodecage.com/forumz/member.php?userid=113 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=69267 -- Dave Peterson |
Text wrapping
It appears the site is showing some peculiarities with timing and displays. Leading dots certainly appear here and I always check for an "intervening" post before I post. +-------------------------------------------------------------------+ |Filename: screenshot.jpg | |Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=83| +-------------------------------------------------------------------+ -- mdmackillop ------------------------------------------------------------------------ mdmackillop's Profile: http://www.thecodecage.com/forumz/member.php?userid=113 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=69267 |
Text wrapping
On Feb 28, 10:24*am, mdmackillop
wrote: It appears the site is showing some peculiarities with timing and displays. *Leading dots certainly appear here and I always check for an "intervening" post before I post. +-------------------------------------------------------------------+ |Filename: screenshot.jpg * * * * * * * * * * * * * * * * * * * * * | |Download:http://www.thecodecage.com/forumz/attachment.php?attachmentid=83| +-------------------------------------------------------------------+ -- mdmackillop ------------------------------------------------------------------------ mdmackillop's Profile:http://www.thecodecage.com/forumz/member.php?userid=113 View this thread:http://www.thecodecage.com/forumz/sh...ad.php?t=69267 Dave, Re my earlier post, I was responding on the CodeCage site, and was not aware that this was linked to a newsgroup thread. Your reply "there" was 10 minutes after mine. Apologies for any misunderstanding. Regards MD |
All times are GMT +1. The time now is 02:09 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com