+ Reply to Thread
Results 1 to 15 of 15

Error 75 File/Path access error, sometimes Error 1004

  1. #1
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Angry Error 75 File/Path access error, sometimes Error 1004

    I have been making a large-ish userform project over the last 2 weeks. Something is causing a fatal error about every 15 minutes. Most of the time the code executes smoothly, but SOMETIMES when I execute a procedure or save the workbook, I get either Error 75 File/Path access error or Error 1004 Object not Found. When debugging is possible, userform.show is highlighted. But if the error comes on the save event (autosave included), excel just crashes.

    I have tried to get in the habit of saving the workbook every time I do anything, but this is really getting more frequent and it's getting under my skin. I've found several other people having similar issues on other forums, but no real answers. I have read that MS Query may have a memory leak or that perhaps it could be caused by how I am loading the combo boxes in the listform. But I would guess that such an error would throw EVERY time, not only some of the time.

    So far I have debugged my code and copied my entire project into a new workbook, a version of which is attached. Please open the workbook and fool with it - open the userforms and change the combo boxes, etc for a while with the VBA editor open (while you're at it feel free to look over my code for what might be causing the error..) It will crash eventually.

    PS - several places I have put pieces of ADO code. for obvious reasons I have changed the server path to \\server\quotes1.accdb - so i have also attached an empty file called quotes1.accdb, which you can save to your desktop and modify those references to make the whole code work for you.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Error 75 File/Path access error, sometimes Error 1004

    Nothing?

  3. #3
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Error 75 File/Path access error, sometimes Error 1004

    Did you expect people to wade through your project looking for an occasional error over the weekend?
    Remember what the dormouse said
    Feed your head

  4. #4
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    2003, 2007, 2010, 2013
    Posts
    1,252

    Re: Error 75 File/Path access error, sometimes Error 1004

    I haven't read through or tried to run your code, but there are a couple of things I immediately noticed.

    You could start by adding Option Explicit to all of the code modules and then Debug > Compile to ensure your variables are declared.

    Additional controls such as the calendar control can be buggy when embedded on a multipage. It might be worth creating a copy without the calendar controls (don't use DT pickers either) to see if the problem persists.
    Hope that helps,

    Colin

    RAD Excel Blog

  5. #5
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Error 75 File/Path access error, sometimes Error 1004

    @Colin: Thank you for the suggestion. I'll try that and we'll see if it works.
    @romperstomper: I had to put SOMETHING to bump the topic

  6. #6
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Error 75 File/Path access error, sometimes Error 1004

    Colin,
    I was hoping your solution would work, but alas it has not. I have continued getting the path/file access error at times when I am initializing a form or saving the workbook.

    In the meantime I managed to put in some code to set all the object variables to nothing at the end of the procedures that use object variables, in hopes that there would be a memory leak somewhere that I could plug. That doesn't seem to have helped either.

    Anybody got another idea?

  7. #7
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Error 75 File/Path access error, sometimes Error 1004

    Are you opening this from a network share? If so, try opening it locally and see if the problem persists.

    And you might try CodeCleaner
    Entia non sunt multiplicanda sine necessitate

  8. #8
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Error 75 File/Path access error, sometimes Error 1004

    @shg: No I have been developing this locally, although the goal is to ultimately move it to a network shared drive. The ADO connection does point to a shared network drive location.

    I'll try using the code cleaner.
    Last edited by smokebreak; 02-14-2011 at 04:54 PM. Reason: missed the CodeCleaner link

  9. #9
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Thumbs down Re: Error 75 File/Path access error, sometimes Error 1004

    Great...

    When I run the Code Cleaner I get:

    "Microsoft Office Excel has encountered a problem and needs to close. We are sorry for the inconvenience."

    No error number, no debug, just close. Obviously the Code Cleaner has found the error and is stepping all over it :P

    How would one get around THAT? Can you try on your computer, using the attachment?

  10. #10
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Error 75 File/Path access error, sometimes Error 1004

    No, but thank you

    You can do what it does manually:

    Create a directory, and export all of the code modules to it.

    Remove all of the code modules (or just save as an xlsx file).

    Save, close, and reopen the now-codeless workbook. Drag the exported modules back into the project.

  11. #11
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Error 75 File/Path access error, sometimes Error 1004

    Hmmm I have already done this once with a totally fresh workbook.

  12. #12
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Error 75 File/Path access error, sometimes Error 1004

    I do have one question from a quick skim of the code:
    Why are you adding references in code rather than just setting them at design time? If they are available on the machine in question, then your code should work; if not, then trying to add them won't help.

  13. #13
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Talking Re: Error 75 File/Path access error, sometimes Error 1004

    @romperstomper: I was not aware of that. Are you saying the references will "turn on" automatically when the code is run on a random user's machine?? If so, I'll go ahead and take that code out (although I am pretty sure that isn't causing the error).

  14. #14
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Error 75 File/Path access error, sometimes Error 1004

    Correct. References are stored as part of the workbook.

  15. #15
    Registered User
    Join Date
    12-15-2009
    Location
    Houston, TX, USA
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Error 75 File/Path access error, sometimes Error 1004

    Well, I have run the code and tested the workbook on two other machines, and those machines did not experience the same crash phenomenon that I have been experiencing. This leads me to believe the error has arisen from my copy of Office 2007. I have repaired it (1 "setup" repair was found and completed) but I'm requesting our IT department to do a full re-install just in case.

    I will keep you posted.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1