+ Reply to Thread
Results 1 to 4 of 4

Userform Multiline textbox w/ auto adjust height - first line of text disappears

  1. #1
    Registered User
    Join Date
    10-04-2017
    Location
    North Carolina
    MS-Off Ver
    2013
    Posts
    29

    Userform Multiline textbox w/ auto adjust height - first line of text disappears

    Hello all,

    I have a userform containing a textbox with multiline and word wrap set to true. I have added code to allow the height to expand automatically as the user adds text, which functions properly. However, when the text entered reaches the second line, the first line moves up and can't be seen. The user can "arrow up" the cursor and the first line will become visible again, but is there any way to prevent this from happening in the first place? Here are some screenshots:

    First line of text

    First line.png


    Right as the second line is generated

    Right as the second line is generated.png


    As you type in the second line (it came back!)

    As you type in the second line.png


    As the third line is generated (it's gone again )

    The third line is generated.png


    Also, here is the code I used to autoadjust the height of the textbox:

    HTML Code: 
    Any help would be greatly appreciated!

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Userform Multiline textbox w/ auto adjust height - first line of text disappears

    You could try adding:

    Please Login or Register  to view this content.
    just after you set the height.

  3. #3
    Registered User
    Join Date
    10-04-2017
    Location
    North Carolina
    MS-Off Ver
    2013
    Posts
    29

    Re: Userform Multiline textbox w/ auto adjust height - first line of text disappears

    Hallelujah!!! That works perfectly! Thank you so much!

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Userform Multiline textbox w/ auto adjust height - first line of text disappears

    Glad to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to adjust row height of row so tall the point to grab to adjust auto falls below
    By juntjoo in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 06-22-2016, 02:07 PM
  2. MultiLine TextBox line count to display in label or textbox
    By khhoa in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2015, 06:02 PM
  3. [SOLVED] MultiLine Textbox to auto remove blank line, count line, remove duplicate
    By khhoa in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-24-2015, 09:28 PM
  4. Replies: 2
    Last Post: 01-05-2013, 12:42 AM
  5. Auto-adjust cell height to accommodate contained text.
    By PETBerkeley in forum Excel General
    Replies: 5
    Last Post: 10-28-2005, 03:05 PM
  6. transferring multiline text from userform to worksheet - line break problem
    By Paul in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-07-2005, 11:06 PM
  7. Row Height Auto Adjust When Text Wraps
    By TomBrooklyn in forum Excel General
    Replies: 0
    Last Post: 04-21-2005, 10:31 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1