Consulting

Results 1 to 3 of 3

Thread: WordWrap and TextBoxes

  1. #1
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location

    WordWrap and TextBoxes

    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?
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  2. #2
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    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.
    K :-)

  3. #3
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location
    Quote Originally Posted by Killian
    . 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 ...
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •