Path/File access error 75

sharky12345

Well-known Member
Joined
Aug 5, 2010
Messages
3,404
Office Version
  1. 2016
Platform
  1. Windows
I am trying to move and rename the activeworkbook to another folder but I keep getting an Error 75 Path/File access error.

I'm using this:

VBA Code:
Dim sFolder As String
Dim dFolder As String

sFolder = ThisWorkbook.Path & "\"
dFolder = ThisWorkbook.Path & "\Update Folder\"

Name sFolder & ThisWorkbook.Name As dFolder & ThisWorkbook.Name

I have full read and write permissions on the drive in question, (which happens to be on a network), and the line which throws the error is:

VBA Code:
Name sFolder & ThisWorkbook.Name As dFolder & ThisWorkbook.Name

I have tried saving a copy of the current workbook by using this:

VBA Code:
Dim sFolder As String
Dim dFolder As String

sFolder = ThisWorkbook.Path & "\"
dFolder = ThisWorkbook.Path & "\Update Folder\"

ActiveWorkbook.SaveAs dFolder & "Test.xlsm"

and it works fine, the problem I then have is I get a permission denied error when I try to delete the original file, hence I thought the 'Name' procedure would be more efficient.

Is anyone able to offer me advice or an explanation as to why this won't work?
 
Maybe you could try
VBA Code:
DoEvents
after the save and before the kill? Clutching at straws though
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
What size is the file that is being Saved? When I'm testing, I'm using a single sheet blank workbook. Maybe test the code on a blank workbook first. If that works we'll know it's related to the workbook, if you still get the issue then it's something outside of excel.
 
Upvote 0
All I can suggest at this point is starting another thread for the new issue, maybe another member knows exactly what causes it
 
Upvote 0
Thanks gallen - I'll do some testing on a blank workbook as you suggest and then start a new thread....
 
Upvote 0

Forum statistics

Threads
1,214,647
Messages
6,120,722
Members
448,987
Latest member
marion_davis

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