Run-time error 76

Galceran

Board Regular
Joined
Nov 8, 2008
Messages
177
A new macro runs to format a worksheet then SavesAs, at which point error 76 path not found appears.
Code:
ChDir "C:\Users\Arthur\My Documents\My Data Sources"
    ActiveWorkbook.SaveAs Filename:= _
        "C:\Users\Arthur\My Documents\My Data Sources\tn11_merge.xls", FileFormat:= _
        xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _
        , CreateBackup:=False
The path is correct. I now find that another macro which saves a different filename in the same location is returning error 1004. This macro previously ran and saved correctly.
Any ideas?
Thanks
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
The syntax is correct. Same files on the PC Macro runs the same macro and saves without a problem.
 
Upvote 0
Same files on the PC Macro runs the same macro and saves without a problem

Could be that the directory has been hard harded to save to "C:\Users\Arthur\My Documents\My Data Sources" which is only applicable to the user "Arthur" i.e. someone else is running the code when it fails as they don't have the "C:\Users\Arthur\My Documents\My Data Sources" path on their machine.
 
Upvote 0

Forum statistics

Threads
1,214,861
Messages
6,121,969
Members
449,059
Latest member
oculus

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top