sharky12345
Well-known Member
- Joined
- Aug 5, 2010
- Messages
- 3,404
- Office Version
- 2016
- Platform
- 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:
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:
I have tried saving a copy of the current workbook by using this:
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?
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?