PDA

View Full Version : Userform problem



Mikroicy
07-10-2017, 02:09 AM
I created a userform with multiple textboxes which are connected to specific cells in different worksheets through controlsource. The problem is with multiline textboxes. as soon as a few cells are populated with multiline text, the excel freezes or seems like it is in constant loop and cannot be closed. Is there any way this can be fixed?

Also, If I delete the text in cells (worksheet) before opening the userform, everything works fine. However if I enter multiline data in userform and then close the document and open it again the same problem occures. so I guess the problem is with to many multiline textboxes.

mdmackillop
07-10-2017, 02:16 AM
Can you post a workbook with sample text and your userform?

Mikroicy
07-10-2017, 02:21 AM
Could you write me your e-mail. and I can send you the excel file since it contains private information?

Mikroicy
07-10-2017, 02:36 AM
I have stripped the file but the problem is the same. I have marked the problem area with yellow. if you delete the text in yellow marked cells (workbook - list called Zdravila) prior to opening the userform (called Asistent) it should run fine untill you write multiline text into multiple cells (textboxes). then it freezes upon reopening the userform.

mdmackillop
07-10-2017, 03:24 AM
Your code is looping on this routine:
Function GetTextRow(WhereFrom As Range, RowNumber As Integer)

mdmackillop
07-10-2017, 03:38 AM
Are you sure there is nothing confidential in the code?

Mikroicy
07-10-2017, 04:41 AM
Removed the attachment. Shouldn't be since it is all my work. I noticed that there was the loop, but the problem remained even if I deleted the mentioned function. do you have any taughts on how to solve this?

mdmackillop
07-10-2017, 04:50 AM
I suspect your workbook is corrupted. I've deleted the probem functions from Row 30 but thereafter deleting highlighted text still causes the book to freeze, despite no dependent cells. This doesn't seem directly connected with the userform.
BTW. Best if you unprotect sheets before posting, or provide a password.

Edit: There seems to be no issue with the function. It works in a new workbook.

Mikroicy
07-10-2017, 04:57 AM
Ok. I removed the protection and deleted the modules. just in case there is sensitive data inside.

mdmackillop
07-10-2017, 05:13 AM
OK on further testing it appears to be connected with the userform. If I export it and delete it, I can clear the yellow cells without freezing. Reimporting causes the issue again.
I can't think of a simple solution other than starting again.

Mikroicy
07-10-2017, 05:20 AM
Also, if you delete the data from the yellow cells and copy the multiline text into different cells it has the same problem, but if you leave it at sigleline everything runs smoothly. it's like the userform doesnt support more than a few textboxes with multiline.

Mikroicy
07-10-2017, 05:25 AM
Anyways, I apreciate you taking the time to look into my problem.