View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Robert Crandal Robert Crandal is offline
external usenet poster
 
Posts: 309
Default Userform problem with "Run Time Error 75"

"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.