ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Text wrapping (https://www.excelbanter.com/excel-programming/424762-text-wrapping.html)

Patrick C. Simonds

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.


Dave Peterson

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

mdmackillop[_45_]

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


Tom Hutchins

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.



mdmackillop[_46_]

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


Dave Peterson

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

mdmackillop[_51_]

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


[email protected]

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

Dave Peterson

Text wrapping
 
There are logs of sites that swoop up newsgroups and display them in web
interface.

Personally, I find them slow and irritating.

If you're going to hang around the newsgroups, you may want to avoid the web
page interface (if you can).

Saved from a previous post:

If you have Outlook Express installed, try clicking on these links (or copy and
paste into MSIE).

news://msnews.microsoft.com/microsof...ic.excel.setup
news://msnews.microsoft.com/microsoft.public.excel.misc
news://msnews.microsoft.com/microsof...heet.functions
news://msnews.microsoft.com/microsof...excel.newusers
news://msnews.microsoft.com/microsof...el.programming

(and a few more for MSWord)
news://msnews.microsoft.com/microsof....docmanagement
news://msnews.microsoft.com/microsof...word.word97vba
news://msnews.microsoft.com/microsof....word.newusers
news://msnews.microsoft.com/microsof...ord.pagelayout
news://msnews.microsoft.com/microsof...ord.vba.addins
news://msnews.microsoft.com/microsof....vba.beginners
news://msnews.microsoft.com/microsof....customization
news://msnews.microsoft.com/microsof...rd.vba.general
news://msnews.microsoft.com/microsof....vba.userforms
news://msnews.microsoft.com/microsof....word6-7macros

(You can always connect to more later)

Here are some links that explain it better:

Chip Pearson has some notes written by Leonard Meads at:
http://www.cpearson.com/excel/DirectConnect.htm

David McRitchie's notes at:
http://www.mvps.org/dmcritchie/excel/xlnews.htm
http://www.mvps.org/dmcritchie/excel/oe6.htm
http://www.mvps.org/dmcritchie/excel/oe6nws01.htm

Tushar Mehta's notes at:
http://www.tushar-mehta.com/misc_tut...e_ng/index.htm

And if you're looking for old posts:

Or you can use google (maybe a few hours behind) to search for stuff you've
posted (and find the replies, too)

http://groups.google.com/advanced_group_search
http://groups.google.com/advanced_gr...Excel*&num=100

Ron de Bruin has an excel addin that you may like:
http://www.rondebruin.nl/Google.htm

=========
But no matter which way you post responses, there will be delays. You may not
see any responses and post an answer. Then come back to see yours is one of
several similar all posted within the same time frame.



wrote:

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


--

Dave Peterson


All times are GMT +1. The time now is 02:09 AM.

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