bradyboyy88
Well-known Member
- Joined
- Feb 25, 2015
- Messages
- 562
Hi,
I have a VBA program that has multiple modules and basically it starts a userform on workbook_open event. Then it goes to a log on screen in the userform. Once a userlogs in the code checks credentials against database to make sure its legit then it goes through a subroutine which basically sizes all the frames inside the userform. Sometimes the program will go not responding and crash at this point and I have narrowed it down to which part of the code does it:
Its strange because it will not always do this. To ensure it doesnt do it basically before i log in from the userform I will go to the VBE editor and close the userform then reopen it by running the workbook_open event. Its strange why that always ensures it doesnt do not responding and crash. I would also note that if by luck i open the excel workbook during a time that it wasnt going to not respond/crash and save it. Then re openining it in read only will automatically ensure it will not crash and will run as expected every time but only in read only since it was last saved in an okay state.
I cannot for the life of me figure this out.
I have a VBA program that has multiple modules and basically it starts a userform on workbook_open event. Then it goes to a log on screen in the userform. Once a userlogs in the code checks credentials against database to make sure its legit then it goes through a subroutine which basically sizes all the frames inside the userform. Sometimes the program will go not responding and crash at this point and I have narrowed it down to which part of the code does it:
Code:
USERFORM1.BrowseFrame.Top = 30
USERFORM1.BrowseFrame.Left = 120
USERFORM1.BrowseFrame.Width = 822
USERFORM1.BrowseFrame.Height = 462
Its strange because it will not always do this. To ensure it doesnt do it basically before i log in from the userform I will go to the VBE editor and close the userform then reopen it by running the workbook_open event. Its strange why that always ensures it doesnt do not responding and crash. I would also note that if by luck i open the excel workbook during a time that it wasnt going to not respond/crash and save it. Then re openining it in read only will automatically ensure it will not crash and will run as expected every time but only in read only since it was last saved in an okay state.
I cannot for the life of me figure this out.