+ Reply to Thread
Results 1 to 9 of 9

Userform / Spreadsheet Text Wrap

  1. #1
    Registered User
    Join Date
    09-30-2015
    Location
    United States
    MS-Off Ver
    2007
    Posts
    37

    Userform / Spreadsheet Text Wrap

    I have a text box in my userform. The text box has multi-line and word wrap set to True. When I transfer the data from the userform to the spreadsheet, the data appears as a long string. If I format that particular cell on the spreadsheet with word wrap, the content will wrap, but the cell does not resize. What could be going on?

    Thanks,

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Userform / Spreadsheet Text Wrap

    The VBE text box does not transfer its word wrap property to the Excel App. The Excel cell needs to be set to wrap text independently. Include the instruction

    Please Login or Register  to view this content.
    when you send the text box value to the sheet.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-30-2015
    Location
    United States
    MS-Off Ver
    2007
    Posts
    37

    Re: Userform / Spreadsheet Text Wrap

    where do i add this?

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Userform / Spreadsheet Text Wrap

    The obvious place would be in the same procedure that transfers the text box value.

  5. #5
    Registered User
    Join Date
    09-30-2015
    Location
    United States
    MS-Off Ver
    2007
    Posts
    37

    Re: Userform / Spreadsheet Text Wrap

    I've added this code right below the instruction to transfer the notes text box data to the spreadsheet.
    Please Login or Register  to view this content.
    Range("$J$26").WrapText = True
    Please Login or Register  to view this content.
    The form transfers the data. The cell is populated. The wrap text button is selected for that cell. If I double click on the cell the data is there and wrapped; but the cell doesn't resize to show all the data.
    what am i missing?

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Userform / Spreadsheet Text Wrap

    Hi,

    Any chance you could upload the workbook so that we can see in context?

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Userform / Spreadsheet Text Wrap

    Which of the Text box events are you using?

  8. #8
    Registered User
    Join Date
    09-30-2015
    Location
    United States
    MS-Off Ver
    2007
    Posts
    37

    Re: Userform / Spreadsheet Text Wrap

    I found out the auto resize to height does not work on merged cells...which these happen to be.

    I'll have to figure something else out.

    Thanks for your help
    Last edited by BigPaulMc; 11-22-2015 at 08:04 PM.

  9. #9
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Userform / Spreadsheet Text Wrap

    I think you'd better upload the workbook so that we may see your problem in context. I assumed because you had mentioned a User Form and VBA that you were familiar with the VBE and how the code worked.

+ 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] Wrap text in ControlTipText userform or Alternative method?
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 05-27-2015, 10:21 AM
  2. [SOLVED] Userform: How do I use text/values from a spreadsheet to customize the userform?
    By bananajelly in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2014, 03:47 PM
  3. [SOLVED] Can't get Textbox in Userform to wrap
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-08-2014, 10:27 AM
  4. [SOLVED] Wrap Text in ListView: how to wrap text in the columns of a list view
    By TommyToe in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 07:02 AM
  5. How to wrap text for a spreadsheet in Userform.
    By shals in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2012, 11:49 AM
  6. Text wrap and allow cell height to increase with wrap
    By tpenterprize in forum Excel General
    Replies: 1
    Last Post: 10-19-2007, 02:30 PM
  7. Replies: 0
    Last Post: 12-06-2005, 05:20 PM

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