+ Reply to Thread
Results 1 to 11 of 11

Help in auto fit text with multiline and next line in VBA in a auto merge cells

  1. #1
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Exclamation Help in auto fit text with multiline and next line in VBA in a auto merge cells

    Hi everyone,

    I encountered some difficulty when i was doing a cell row value where if they contain too many words and new line then the row will hide the word
    Currently i am using an user form for the user to fill in the text then it be put into my merge cell as what my requirement is enterkeybehaviour and multiline is set to true
    as currently my cell is being merge together A4:C4

    however i believe autofit dont work with merge cells is there a way no matter how much i type in my userform text when it paste into the Cell of A4:C4 all the words can see clearly ? i have discovered than an row limit height at 409.2 there which mean we will need to merge the next row to show the words fully if the word exceed the amount

    I have attached the file as an example of what i am doing.

    Please help!
    Attached Files Attached Files
    Last edited by excelvbanew; 05-18-2023 at 04:09 AM.

  2. #2
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,023

    Re: Help in auto fit text with multiline and next line in VBA in a auto merge cells

    Rule No 1 in Excel Vba...Don't use merged cells...
    Good Luck...
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
    Also....Add a comment if you like!!!!
    And remember...Mark Thread as Solved...
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Help in auto fit text with multiline and next line in VBA in a auto merge cells

    is it possible say i unmerge first then merge it back ?

  4. #4
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,023

    Re: Help in auto fit text with multiline and next line in VBA in a auto merge cells

    When in doubt see rule no 1

  5. #5
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Help in auto fit text with multiline and next line in VBA in a auto merge cells

    even say is unmerge is there a way where i can autofit the 1000 word whether there is a space etc in the cell ??

  6. #6
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,023

    Re: Help in auto fit text with multiline and next line in VBA in a auto merge cells

    Just populate them below each other...What is it you are actually trying to do and why...Explain your process...

  7. #7
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Help in auto fit text with multiline and next line in VBA in a auto merge cells

    i would like user to auto populate the text that added in the user form to the merge row originally and show the full value visible of what they written
    as user arent able to write anything in the merge row
    but issue due to merge row now

  8. #8
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,023

    Re: Help in auto fit text with multiline and next line in VBA in a auto merge cells

    why not populate below each other in separate rows...

  9. #9
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Help in auto fit text with multiline and next line in VBA in a auto merge cells

    due to some straight business process currently is like this .............

  10. #10
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: Help in auto fit text with multiline and next line in VBA in a auto merge cells

    I have try to make it work however after realize that a limited height row for a row which is at 409 there
    my vba i am able to successfully make it a new row when it exceed 409 however it didnt start from the hide cut value it start a new one again does anyone how to fix this ??
    i did it directly the userform when the user click ok it will reformat my cells and do whatever it suppose to do
    Attached Files Attached Files
    Last edited by excelvbanew; 05-18-2023 at 09:37 AM.

  11. #11
    Forum Guru Sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2019 | 2021
    Posts
    15,023

    Re: Help in auto fit text with multiline and next line in VBA in a auto merge cells

    Time to teach your boss how to do it the proper way...Merged cells causes havoc with excel vba...Gonna have issues all the time...

+ 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. Returning a full line from multiline text
    By RyderS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2022, 01:21 PM
  2. [SOLVED] Auto numbering for merge cells
    By chaiyya345 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-24-2019, 10:41 PM
  3. Userform Multiline textbox w/ auto adjust height - first line of text disappears
    By jrooney7 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-05-2018, 01:49 PM
  4. Auto-merge cells
    By ScottyZ92 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-07-2017, 05:05 PM
  5. [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
  6. How to copy/paste text from ws to ws with Merge/Wrap/Auto Fit
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 03-04-2013, 12:44 AM
  7. Auto Merge Cells?
    By cecarter74 in forum Excel General
    Replies: 1
    Last Post: 06-14-2006, 02: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