Text wrapping

P

Patrick C. Simonds

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.
 
D

Dave Peterson

How about autofitting the row after you've populated the cell?

with somecellreferencehere
.value = me.textbox1.value
.wraptext = true
.entirerow.autofit
end with
 
T

Tom Hutchins

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
 
D

Dave Peterson

Between your suggestion and mine?

Yours was posted 4 minutes after mine.

And your leading dots were lost in the post.
 
M

mdmackillop

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|
+-------------------------------------------------------------------+

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
 
D

Dave Peterson

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/microsoft.public.excel.setup
news://msnews.microsoft.com/microsoft.public.excel.misc
news://msnews.microsoft.com/microsoft.public.excel.worksheet.functions
news://msnews.microsoft.com/microsoft.public.excel.newusers
news://msnews.microsoft.com/microsoft.public.excel.programming

(and a few more for MSWord)
news://msnews.microsoft.com/microsoft.public.word.docmanagement
news://msnews.microsoft.com/microsoft.public.word.word97vba
news://msnews.microsoft.com/microsoft.public.word.newusers
news://msnews.microsoft.com/microsoft.public.word.pagelayout
news://msnews.microsoft.com/microsoft.public.word.vba.addins
news://msnews.microsoft.com/microsoft.public.word.vba.beginners
news://msnews.microsoft.com/microsoft.public.word.vba.customization
news://msnews.microsoft.com/microsoft.public.word.vba.general
news://msnews.microsoft.com/microsoft.public.word.vba.userforms
news://msnews.microsoft.com/microsoft.public.word.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_tutorials/oe_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_group_search?q=group:*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.
 

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