Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() My usual practise is to display the form, retrieve the form data, then unload the form - the procedure then carries on with the retrieved data. In my case, the "x" box is locked out from the user, and closing, opening and pretty much all else is under vba control. The application I'm working on is very large, and has a large number of forms (approx 30). I'll review all these to make sure that there isn't a "slip up" somewhere. I did my tests on a new and empty project that only contains one userform. I also put one pushbutton on Sheet1 which loads the form as modeless. I then tried opening and closing the form a couple times, then I noticed that Run Time Error 75 kept occurrring.... So, now I'm positive that this error is not due to an error in my code at all, but rather an Excel or operating system specific error! Just be careful if you have a modeless form that can be loaded and unloaded constantly. I'm guessing that the form gets lost in memory somewhere once the unload happens....hence my solution to NEVER unload a form and resort to hide and unhide tactics. Please do keep me informed if you discover anything new regarding this matter. Thank you Dave! Robert C. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Robert,
I did my tests on a new and empty project that only contains one userform. *I also put one pushbutton on Sheet1 which loads the form as modeless. *I then tried opening and closing the form a couple times, then I noticed that Run Time Error 75 kept occurrring.... Would you mind showing me exactly how you're doing this? I set this up, and try as I might, could not get it to fail! Please do keep me informed if you discover anything new regarding this matter. *Thank you Dave! I certainly will. regards, Dave |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sure, I will look for my basic example that creates the error
and I will post it here ASAP. However, I know for sure that if I load my modeless userform just ONCE and never unload it, that I never see the Run Time Error 75 any more. I still haven't pinpointed the exact problem, but I now it happens randomly whenver I unload my userform and try to load it again. Are you still seeing the error?? "Dave Unger" wrote in message ... Hi Robert, I did my tests on a new and empty project that only contains one userform. I also put one pushbutton on Sheet1 which loads the form as modeless. I then tried opening and closing the form a couple times, then I noticed that Run Time Error 75 kept occurrring.... Would you mind showing me exactly how you're doing this? I set this up, and try as I might, could not get it to fail! |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Robert,
Sure, I will look for my basic example that creates the error and I will post it here ASAP. Looking forward to it. However, I know for sure that if I load my modeless userform just ONCE and never unload it, that I never see the Run Time Error 75 any more. * I still haven't pinpointed the exact problem, but I now it happens randomly whenver I unload my userform and try to load it again. Are you still seeing the error?? Yes, it's still happening, sporadically, but I can't seem to generate it at will. I've also something else when I get that error. Let's say I have forms A, B, C, D, E in the vba object list. Assume that I get the error while trying to access form C. Now I find I can open any form above that (A to B in this case), but nothing from C on down (C to D). I'm getting out of my depth here, but it seems that the form object list has somehow been severed at that point. I'm hoping your example will allow me to re-create this anytime. regards, Dave |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, it's still happening, sporadically, but I can't seem to generate
it at will. *I've also something else when I get that error. *Let's say I have forms A, B, C, D, E in the vba object list. Assume that I get the error while trying to access form C. *Now I find I can open any form above that (A to B in this case), but nothing from C on down (C to D). * Sorry, typo in my last message, above line shoud be: Now I find I can open any form above that (A to B in this case), but nothing from C on down (C to E). |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"Dave Unger" wrote in message
... I'm hoping your example will allow me to re-create this anytime. Operating System: Window XP, Service Pack 3 (upgraded recently from SP 2) Software used: Excel 2007 Steps to follow: 1) Create a new/blank-workbook project. 2) Insert new "userform" object into your project. (Leave the form empty, with no controls!) 3) Insert a "pushbutton" (form control) on top of Sheet1. 4) Assign new macro for "Button1", which by default links with the "Button1_Click()" subroutine. 5) In your "Button1_Click()" subroutine, enter the following code: UserForm1.Show vbModeless 6) Go to Sheet1 and press "Button 1".... this will display your userform in modeless form. 7) Close the userform by pressing the "X" button. 8) On Sheet1, type random data into any 3 or more cells. Go to Sheet2 and Sheet3 and do the same. Just enter random data into all sheets, then switch back to Sheet1. 9) Now leave your PC alone for 3 or more minutes. My screensaver starts after 3 minutes. 10) Come back to your PC and try to load the userform again by pressing "Button 1". It is at this point where you should see any of the following errors: "Path/File access error" or "Cannot find specified object". If you don't see an error message right away, keep repeating steps 7 to 10 above until you see the error message. Many people here have suggested that possibly there was an error in my code, but as you can see above I have created a completely empty project that contains only ONE userform, ONE pushbutton, and ONE line of code, yet I am still seeing an error message. This must be an Excel or operating system specific bug, don't you think??? Anyways, the only workaround that I found was to avoid "unloading" the modeless userform; if a user tries to close the form by pressing "X", I simply hide the form instead of unloading it. (I then unhide or show it again if necessary!) Perhaps I am missing an upgrade or patch for Excel 2007??? If I finally solve this mystery I will surely let you know Dave! Please run the above steps and tell me if you see the same error. Also let me know if you figure out how to fix this. Thank you! Robert C. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Robert,
Thanks for this. I set up your scenario and sure enough, I get that error message too. Additionally, if I close this workbook before I get the message, then open another application in the same instance of Excel, the new application will also generate the error message. I haven't been able to track anything down yet, sometimes I'll get the message after a couple of minutes, other times it'll be Ok for 15 - 20 minutes. I'll let you know if anything else develops. regards, Dave PS - I am surprised that no one else has reported having this problem. |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() I have been having this issue on a few of my sheets. I only just recently found the forum because previously I only noticed the crash when I attempted to save. Once I realized it was attached to the userform I changed my search string and came up with this. I am having this same issue. As far as I have been able to test not "unloading" doesn't resolve anything. It will still crash. I am running windows 7. Has anyone found a solution to this issue? -- boggimedes ------------------------------------------------------------------------ boggimedes's Profile: http://www.thecodecage.com/forumz/member.php?u=1798 View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=165579 http://www.thecodecage.com/forumz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Userform problem with "Run Time Error 75" | Excel Programming | |||
Help with userform problem: error message "obj doesn't support thisproperty or method" | Excel Programming | |||
Userform problem with "obj doesn't support this property or method"error message. | Excel Programming | |||
how do I correct a "run time error 1004-unable to open" problem? | Excel Programming | |||
"Can't Show Modally" - Run-Time Error '400' Problem | Excel Programming |