Free Microsoft Excel 2013 Quick Reference

UserForm: File/Path Access Error & I/O Error

Dear All,

Please can you help?

I've rambled on for serveral threads recently about problems I am experiencing with userforms. Finally I have managed to replicate my problem in the smallest file I can.

First off, the spreadsheet needs to be copied to a directory called "C:downloads" as it contains a ODBC query to itself (In reality, this is a query to an External Oracle Database)

On loading, it should pop up a simple userform, with a combo and two command buttons, which when pressed takes you to a (hidden) tab that displays a pivottable.

All works well until I try to close /save when 60% of the time, Excel encounters problems and closes and will not load up the file the next time until either quit excel or disable macros. Messages include "file/path access error", "I/O Error" or get restarts excel.

On a casual run through, I expect you might report back that "All worked ok for me". Please can you give it a bit of a thrashing, comment out the userform show, save the file (frequently) becuase i assure you it will break ultimately!

This is a brand-new file and I've tried it on about 5 different PC running different versions of Excel and generally get the same result.

I must be doing something wrong.

I would be extremely grateful for any help / guidance you can provide.

Sincere regards,


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, 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 serverquotes1.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.

I have a toolbar in which i have some command buttons.
The Buttons are Clear,Hide and Sort.
I first perform a clear option and after that i press a sort option and i get "File/Path Access Error".

I Have recentley downloaded p.c. beginner from a c. d. disc when i go to get
into programme E8 by booting the disc first then getting the page i want all
i get is
"Error I/O 32. does anybody know what this means and how to get rid of it

i am running windows XP Profesional

Thanks in advance for your help

I Have recentley downloaded p.c. beginner from a c. d. disc when i go to get
into programme E8 by booting the disc first then getting the page i want all
i get is
"Error I/O 32. does anybody know what this means and how to get rid of it

i am running windows XP Profesional

Thanks in advance for your help

Hi all,

Below is some code that is similar to that I have used before but when I try to run the code automatically when the file is opened I keep getting the Path/access error 75 message and when I go to debugging the error is said to be at the part of the code. When I the stop the code excel crashes.

Can any one see any obvious problems please.

Thanks for any help

    Application.ScreenUpdating = False 
    CommandBars("standard").Visible = False 
    CommandBars("formatting").Visible = False 
    CommandBars("drawing").Visible = False 
    Application.DisplayFormulaBar = False 
    Application.CommandBars("Worksheet menu bar").Controls(10).Delete 
    Application.CommandBars("Worksheet menu bar").Controls(9).Delete 
    Application.CommandBars("Worksheet menu bar").Controls(8).Delete 
    Application.CommandBars("Worksheet menu bar").Controls(7).Delete 
    Application.CommandBars("Worksheet menu bar").Controls(6).Delete 
    Application.CommandBars("Worksheet menu bar").Controls(5).Delete 
    Application.CommandBars("Worksheet menu bar").Controls(4).Delete 
    Application.CommandBars("Worksheet menu bar").Controls(3).Delete 
    Application.CommandBars("Worksheet menu bar").Controls(2).Delete 
    Application.CommandBars("Worksheet menu bar").Controls(1).Delete 
    ActiveWindow.DisplayWorkbookTabs = False 
    Worksheets("Data").Visible = True 
    Worksheets("Config").Visible = xlVeryHidden 
    Worksheets("Table").Visible = xlVeryHidden 
    Application.ScreenUpdating = True 
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

Dear All,

Please can somebody help with my problem? I know it looks really boring to read this lot through but I would really appreciate your advice.

I am having significant problems with one of my spreadsheets (causes Excel to repeatedly crash) since I tried to automate it using userforms.

Unfortunately I can't post the actual spreadsheet due to file size limitations plus the fact that it contains queries to external datasources so I will try and describe it as best I can in pseudo-code. Hopefully someone can see the errors of my ways?

Failing that, I am trying to reconstruct my problem with a cut-down version of the spreadsheet so possibly I might be able to post something in the future.

Here is my scenario:-
1. workbook, containing 3 sheets opens with "sheet1" selected. Sheets 2 & 3 are hidden.
2. simple userform containing 1 combobox and 1 command button display as part of workbook_open() event. Combobox takes as its rowsource a range from sheet1
3.on pressing command button, userform is hidden (not unloaded), macro generates a dynamic SQL statement (using contents chosen from combobox), unhides "sheet2", selects "sheet2" which contains a querytable, updates the command text using the dynamic SQL, refreshes the querty with background refresh = false (i.e. query is completed before macro continues), re-hides "sheet2"
4. macro continues (still originating from the command button on userform), unhides "sheet3", selects "sheet3" which contains a pivottable, using the results of "sheet2" as its datasource.
5. The worksheet_activate() event of sheet3 includes code to refresh the pivot table so as soon as the sheet is selected the PT is refreshed "before the users eyes" with the new data.
6. On pressing the save button, the workbook_beforeSave() event pops up another userform containing a single textbox & command button. The user types password in textbox and command button checks this passoerd. If OK, saves file else informs user that file cannot be saved and exits with cancel=true
7. Moving away from "sheet3" to "sheet1" (the only sheet visible) causes "sheet3" to be hidden in worksheet_deactivate() event.
8. Worksheet_activate() event of "sheet1" re-displays userform and the process starts again.

Well, on the face of it, this appears to work well UNTIL the user either trys to close the spreadsheet or presses save (with the correct password) then :-

1. If excel is still open and you try to re-open the speadsheet is crashes with Excel has generated errors etc....
2. If I close Excel and then re-open, it will begin to load the file and then display a "file/path access error" msgbox, with debug sitting on the statement.
3. Comment out all refrences to and re-save the file. Then reload it, and manually run macro - all is fine. Uncomment, save & run = no joy!
4. Closing the spreadsheet with "sheet1" selected seems to help significantly (why?) but still causes it to crash occassionally,
4. I'm using Excel 2003 but have tried it on Excel 2002 with similar (but not so erratic results)
5. Have created new workbook, added new comboboxes, "cleaned" my VBA project etc without success so I dont think its a corruption issue.

I am convinced its something to do with the order I am trying to do things and Excel is getting itself tied up in knots?

I have tried every permutation of enabling/disabling events, moving code from userforms to worksheet events, again without success.

I've checked and double-checked that my events aren't getting caught in a recursive loop which is normally the problem when I get this kind of error, but perhaps the events of the Querytable are conflicting with the PivotTable?

Why is Excel loosing the userform details between sessions even though i can "see" the forms in the project explorer?

Conceptually, am I doing something wrong?

If your reading this, then thank you for staying with it and I look forward to any advice you can give to restore my sanity!



Hi There

Can anyone suggest the best way to implement a Test versus Production environment switch in VBA for my Access project. I have a module called Constants which is called by most other routines and in here I store things like file paths, drive letters.

I am often working on my project at the office and at home and spend a fair bit of time commenting in/out the two home and office file paths depending on where I am working from.

Is there an easier way to do this? Can I declare a global public variable(s) on startup and switch to whatever environment in one place only once. The reason I ask is that I often read using globals is frowned upon.



I have a Excel file (mybook.xls) which has a button which calls a macro. Hwen I try and open the spreadsheet from another machine and click the button I get a "File not found" error.

I think I know what the problem is....If I go to the Developer tab and select Macro and in the Macro In dropdown list I can see an old excel spreddsheet name in the dropdown list. How do I get rid of this reference? Could this be reason for the file not found error?

Many thanks in advance

I have a database saved as an excel spreadsheet that includes hyperlinks to AutoCAD drawings on my hard drive.

My database worked fine until I recently decided to reorganize my files into more specific folders. Now, when I update my hyoerlinks to the newer and longer file paths, they don't work.

An example of an old file path is:
C:Program FilesAutoCAD LT 2000Drawing FilesAvalon HseBLSouthBLSAva51FBA001FTG.dwg

The same file at its new address is as follows:
C:Program FilesAutoCAD LT 2000Drawing FilesAvalon HseBLSouthFBAVersion #5BLSAva51FBA001FTG.dwg

When I use the hyperlink function, it works fine using my old path, and it gives me an error with the new path that reads "cannot find specified file." I am positive that the file path is spelled accurately as I copied and pasted it from the path in Windows Exploer that points to the given file.

Is there something in Excel that limits the length of a file path in hyperlinks? I sure hope there's a way for me to get this database working without having to go badk to my old filing system.


i have a sheet with an image. how to i get the file path ? how to i save the file path into a string? (if i click on properties of the image, the file path is under the picture property)


Type Record
    ID As Integer
    Name As String * 20
End Type
Sub AddendFile()
' TEST1 = Master File
' TEST2 = Add-on File
Dim MyRecord As Record
Dim RecordNumber
Dim MaxSize
ChDir "C:UsersSteveftpBeta"
Open "TEST1.xlsm" For Random As #1 Len = Len(MyRecord)
Open "TEST2.xlsm" For Random As #2
MaxSize = Len(MyRecord)     ' Get number of records in master.
For RecordNumber = 1 To 3 'Number of new records to place in master
            Position = MaxSize + RecordNumber - 1
            Seek #1, Position ' Put pointer at end of master
            Seek #2, RecordNumber    ' Put pointer at beginning of add-on
            Get #2, , MyRecord    ' Read record in add on
            Put #1, Position, MyRecord   ' Place record at end of master    'ERROR 75 FILE/PATH ACCESS ERROR
Next RecordNumber
Close #1
Close #2
End Sub
The above code generates error 75. Need to know how to work around.

I have two workbooks
TEST1.xlsm = Master file that has in column A the numbers 1 through 21
TEST2.xlsm = A file that contains new data (A,B.C) to be appended to TEST1.xlsm
I want Test1 to read vertically in column A 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,A,B,C

The error stops me from meeting my goal.

How do you display the actual worksheet in the file path? (excel 2010) I need to be able to create a hyperlink where when I click on it, it will open directly that specific worksheet in the workbook. Thanks

I have this macro that I created that seem to to working fine except I keep
getting the "Path/File access error" after the code as run for a while. Then
I get a "Method SaveCopyAs of Object Workbook failed" error" whenI try to
clear the initial error.
This code is suppose to loop through a range and perform a action between
the for loop below. Everything seem to be working fine, at least through 45
loops, more or less, then the error pops up. I don't know how to find the
problem so I can try and fix it.
Any ideas?

'''''''''' Beginning of For Loop ''''''''''''''
For Each c In Worksheets("RFDS Tracker").Range("A4:A" & lastRow)
Worksheets("RFDS Tracker").Activate
active_cell = c.Address

'''''''''' Ending of For Loop '''''''''''''''''''''
Worksheets("RFDS Form").Activate

'''''''''''' RENAME THE RFDS WORKSHEET ''''''''''''''''''''
Worksheets("RFDS Form").Select
Worksheets("RFDS Form").Name = Worksheets("RFDS Form").Range("B8").Value

'''''''''''' SAVE THE FILE ''''''''''''''''''''
fileName = ActiveSheet.Range("B8").Value & "_Ver" &
ActiveSheet.Range("I19").Value & " " _
& Format(Date, "mmm d yyyy")
ActiveWorkbook.SaveCopyAs Saveto_Folder & fileName & ".xls"

Worksheets(Left(fileName, 6)).Select
Worksheets(Left(fileName, 6)).Name = "RFDS Form"
Next c

After searching Google, despite many post started about this error
occurring, I could not find any explanation or solution, so I'll try again.
This runs fine sometimes, but can then error for some unknown reason. A
restart of Excel, log off/log on, Windows can make a difference, but not
Certainly only 1 instance of Excel running.
File name or path may have Chinese in it, but I don't think that's the

--------- Code -----------------------
Dim WBSpecs As Workbook

On Error GoTo cmdGetWS_Click_Error

Response = Excel.Application.GetOpenFileName("HK Spec Files (*.xls), *.xls",
, "Select the Spec Sheet to cost.")
If Response False Then

Set WBSpecs = Workbooks.Open(Response)
With WBSpecs
.Sheets(1).Copy Befo=ThisWorkbook.Sheets("Costings")
.Sheets(2).Copy Befo=ThisWorkbook.Sheets("Costings")
.Close False
End With

Set WBSpecs = Nothing
--------- Code -----------------------

It bombs on ".Sheets(1).Copy Before..." with the error msg "Path/File Access
Error" '.VBxx.tmp'".
Watching the folder containing the open workbook, the file VBxx.tmp is only
created after the error box appears.
Error handler on, so how is this error generating it's own unhandled error ?

Any help greatly appreciated.


We have a user who just started getting this error. All she is trying to do
is "create a copy" of a sheet into the same workbook. Logged on as
administrator it works fine on her pc. I checked the permissions of the
server directory and she has full control of the directory and files. This
particular spreadsheet uses macros.

I thought maybe it was because she uses a mapped drive (H to access the
file but even going thru the UNC path it fails.

The user can add data from my pc logged on as herself so feel I have
isolated to something on her pc.

It does feel like a rights issue. Whn it fails with the vb error, I see the
..tmp files being generated at the servershare level.

If the user creates a new workbook and tries to create a copy, it works
fine. Her macro security is set to medium. Any other settings that could
cause this?

I am getting the following error when copying worksheets within a workbook,
path/file access error: 'vbxxx.tmp' but only under very specific condidions.

Open worksheet with macros from network via Execl's file > open and copy a
worksheet inside a workbook produces the error.

If the spreadsheet doesn't have any macros, no problems. If I go and add a
macro, which is does nothing other than contain an empty function, I get the
If I open the (network) file via windows explorer I don't have a problem
copying worksheets.
If I copy the files to my local hard drive, no problems copying worksheets.
I have tested this on both Office 2000 and Office 2003 and they both get the
I haven't tested Office 2007 yet.

Any feedback would be appreciated.


I have an excel 2003 template containing a userform that is displayed using the workbook_open event.

The userform causes excel to crash with file/path error 75. i have tried many suggestions given on ozgrid and several other forums with no joy.

When the userform crashes, the debugger stops on

I have added stop commands in the initialise procedure to see what is going on and it appears that my userform has disappeared!

please help! i'm pulling my hair out with this one now!

i'm happy to upload the excel template and any other information required to get this sorted.
its size is 765 KB which exceeds the size limit to attach to the post.

here is the workbook_open macro:

     'On Error GoTo MyError
     'Call UnProtectAll
     'Dim frm As UserForm
     'For Each frm In UserForms
     '    Unload frm
    If Left(ThisWorkbook.Name, 11) = "RamseyLomax" Then 
        Application.WindowState = xlMinimized 
         'Application.Wait (Now() + TimeValue("00:00:05"))
         'Load DataFormNew
        Application.Visible = False 
         ' i have previously commented out the following section during troubleshooting
         ' but the form should open automatically regardless of the file name
        Application.WindowState = xlNormal 
         'Load DataFormNew
    End If 
    Exit Sub 
     '    MsgBox "The most recent error number is " & Err & ". Its message text is: " & Error(Err)
End Sub 

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

If the file sits there without being accessed for a while, it gives a message
of "Path/file access error" in vbe. After I click "OK" several times (because
the message keeps pumping up), another message appears, "An unexpected error
occurred. AutoRecover has been disabled for this session of Excel." I click
"OK" and the message is gone. But when I try to save the file, it says,
"Document not saved." So, I have to close the file without saving, then it
sends a typical error message, "Microsoft Office Excel has encountered a
problem and needs to close. We are sorry for the inconvenience." and I have
to choose "Send Error Report" or "Don't Send".

Anyone knows the reasons and how to fix it?

I have a workbook with a VBA project I created with Excel 97 and Win NT. We
recently upgraded to Win XP and Office 2003. The workbook is a template and
when it is opened the user is prompted to save it as a different filename and
then it is unprotected and a user form is opened to allow editing of values.

The macro runs fine the first time and lets me save as a new file and
continue editing as long as I wish just as inteneded. However after closing
the file if I then try to reopen the file for editing I get Path/File access
error (Error 75). Excel then generates an error forcing itself to close and
reopens using the autorecover feature. When the file is recovered all VBA
Projects have been deleted from the file disabling it's futher editing or use.

The initial code is as follows with the error being generated on the
fmPlateDesign.Show line.

Private Sub Workbook_Open()
If ActiveWorkbook.Name = "Plate Design.xls" Then
fName = Application.GetSaveAsFilename
If fName = False Then ActiveWorkbook.Close
Loop Until fName <> False
Workbooks("Plate Design.xls").SaveAs FileName:=fName
End If


End Sub

Any help is appreciated since I don't know what else to try.

I have a xls with lots of macros in it and its crashing on open

i am still trying to find the exact location of the crash, but i am
suspecting its on a command where its LOAD

the crash: I get a File/Path error, then its a popup with Error 75,
then its a Catastrophic error, &H8000FFFF. (Fun stuff!!!)

there is a way around this, but its weird, if i open the sheet, disable
macros, save it, close it, then reopen, enable macros, it works fine

BUT the really weird thing is, the file size of the sheet changes, any
ideas why this would happen? and its not a small change either, the
bigger the initial file size, the bigger the change

Anthony Fok
Anthony Fok's Profile:
View this thread:


How do I get Excel 2007 to drop the file path on formulas with Excel addin
functions in them?

I've just upgraded from Office 2003 to 2007 on XP and am having some trouble
with my Excel addin workbook functions. There are a number of addins that
are kept in a directory on the computer, C:ExcelAddins. They are updated
from time to time and so everyone has them in this directory on there
computer so IT can upload updates. After the Office 2007 upgrade I added
all these addins to Excel 2007. In 2003 I would be able to access the addin
functions by typing in the name and parameters in a cell like so;


However, now when I open Excel files all the addin functions have the #NAME?
error and the functions look like this;

='C:ExcelAddinsFunctionSet1.xla'!CustomFunction1 (A1,A2)

If I remove the file path and ! from the formula the function calculates
correctly. However, I have hundreds of Excel files with hundreds (some
thousands) of the custom formulas in them from the collection of Excel
addins. I can't edit every formula in every file.

How do I get Excel 2007 to drop the file path on formulas with Excel addin
functions in them? Please help me.

Thank you,


I'm using Excel 2000 and when I open a file I get Visual Basic Device I/O
error. My OS is XP Pro SP2.

The Path/File access error ... occur when use VBA code to copy the sheet.

Help me please!

I have a routine that copies a worksheet, opens the SaveAs dialog with a File name made up of values from named ranges and a date from the copied sheet. It also attempts to make a new folder appended to the current workbook path. Here's where I'm having trouble. I keep getting the run-time error 75. The problem is that the error is intermittent. I have tried moving the lines around thinking somehow the MkDir was picking up the newly copied sheet's path instead of the original workbook path, but no joy.

Here is the code:

Option Explicit

Private Sub cmdCopySaveAs_Click()
Dim c As Range
Dim d As Range
Dim NewSht As Worksheet
Dim rngDI As Date
Dim Fname As Variant
Dim str1 As Variant
Dim str2 As Variant
Dim str3 As Variant

str1 = Sheets("Proposal").Range("Lang1").Value
str2 = Sheets("Proposal").Range("Lang2").Value
str3 = Sheets("Proposal").Range("Lang3").Value
rngDI = Sheets("Proposal").Range("PropDate").Value
Fname = Sheets("Set-Up").Range("Project_Name").Value _
& " " & Sheets("Set-Up").Range("Contractor_s_Name").Value _
& Format(rngDI, " mm-dd-yyyy ")
MkDir ThisWorkbook.Path & "Proposals" <<<<ERROR
On Error GoTo 0

Application.Dialogs(xlDialogSaveAs).Show ThisWorkbook.Path _
& "Proposals" & Fname & ".xls"
Set NewSht = ActiveSheet
On Error Resume Next

Application.ScreenUpdating = False
Application.EnableEvents = False
With ActiveSheet
.Range("Lang1") = str1
.Range("Lang2") = str2
.Range("Lang3") = str3
Set d = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)
For Each c In d
With c
.Value = .Value
End With
Next c
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub