ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Problem with Excel crashing when opening an user form (https://www.excelbanter.com/excel-programming/367604-problem-excel-crashing-when-opening-user-form.html)

James

Problem with Excel crashing when opening an user form
 
I have a control button on a worksheet that opens an user form for data
entry. When the user form is opened, vba code is used to populate a series of
text boxes and combo boxes with values stored on a hidden excel sheet. The
user is then able to modify these values as necessary. However, as of late
when the control button is pressed I receive a "Microsoft Office Excel has
encountered a problem and needs to close" error message and am required to
terminate the program.

Here is the wierd part through. I have a password on the vba code that
prevents unauthorized users from viewing the code. If I enter the password in
vba editor the form opens just fine. Likewise, if I save the file without a
password set on the code the form opens just fine from the moment the
workbook is opened.

I have also had a password on the vba code for several months and the user
form opened just fine with the password enabled up until a few days ago. It
is just like all of a sudden this problem started to occur. I have also tried
a couple of the code cleaner utilities that have been linked in this
newsgroup but those don't seem to help either.

Since I need to leave a password on the code, is there a way to determine
the specific reason that I am getting the "Microsoft Office Excel has
encountered a problem and needs to close" error message? I am truly stumped
with this one so any help would be greatly appeciated.

Thanks,
James


All times are GMT +1. The time now is 08:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com