PDA

View Full Version : WordWrap and TextBoxes



MWE
06-12-2006, 06:29 PM
this will probably seem like a silly question, but ...

I assume that when Wordwrap = True for a Userform TextBox, text in that text box will wrap to multiple lines instead of just disappearing out the right end of the text box. For example, given a text box that is large enough to support 3 lines of 25 characters each, I would expect a text string of 60 characters to wrap to 3 lines (approx). That does not appear to be the case for any TextBox in any UserForm for any MS Application on my system. Rather I get the same results whether Wordwrap = False or Wordwrap = True

Do I not understand something here? Or is this just one more example of my unique version of VBA?

Killian
06-13-2006, 01:10 AM
I assume that when Wordwrap = True for a Userform TextBox, text in that text box will wrap to multiple lines instead of just disappearing out the right end of the text box. It's a reasonable assumption and quite correct. The bizzarre twist is that the WordWrap property has no effect if the Multiline property is set to false, which it is by default.

MWE
06-13-2006, 04:33 AM
. It's a reasonable assumption and quite correct. The bizzarre twist is that the WordWrap property has no effect if the Multiline property is set to false, which it is by default. Thanks, that seems to have solved the problem. Interesting how one can use forms for years and never encounter such an obvious and (assumed) frequent event. I must have 50 text boxes in various forms that were sized for multiple lines, but there never was enough text to push the limit of a single line. I should have done a better job of testing the applications ...