Can someone assist me with adjusting the row heights when data is entered from the userform.
Can someone assist me with adjusting the row heights when data is entered from the userform.
Last edited by guitarsweety; 06-28-2014 at 01:38 PM.
You have seven user forms and several worksheets. Where are the rows that you want to adjust?
Nice username
Like your name too
The User Form is UserForm Input and I'm struggling with the data that will be entered in "Behavior and Condition
Description" and "Employee Feedback/Discussions and/or Resolutions" which will be at times rather lengthy.... and the sheet is Data Table
Anyone??????????
The two columns you are referring to actually use multiple columns for one piece of data, which is not a best practice. The way to resolve that is to merge the cells as you have done with the headings on row 11, also not a best practice. The most immediate problem here is that if you have a merged range with wrapped text, Excel will not automatically fit the row height to fit the text contained. The best solution is to redesign your sheet to eliminate the need for merging.
However, to answer the question, I have added sub MergeRange in module Merge to merge a range of cells. This sub is called from cmdbtnSave_Click for these two fields. This will automatically merge the ranges so the text fits, but the autosize is still a problem. So I have written an approximation, which won't work 100% of the time. Sometimes it will result in a height that is a little too big or a little too small.
However...something else is wiping out the formatting that my code does. I suspect it is AutoFitMergedRng. You will have to trace the code and reconcile the issue.
I also set MultiLine to TRUE for your textboxes so text will fill the box.
I also found a compiler error in FillList_NoBlanks . No idea what you are trying to do with this line of code:
Do you mean this:Please Login or Register to view this content.
Please Login or Register to view this content.
6StringJazzer .... You are awesome! I removed the AutoFitMergedRng and it works great. Thank you so much for your help.
Phew! I'm glad it was that easy. I was worried that things were going to get very tangled up. You're welcome!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks