O
Otto Moehrbach
Excel XP & Win XP
I want to move (not copy) a file from one folder to another folder. I tried
the following test macro and I got a #70 error "Permission denied" on the
"FileCopy" line of code. What is the proper code to move a file? Thanks
for your time. Otto
PS: My computer is a sole home computer, not hooked up to any network at
all.
Sub TestMove()
Dim PathSource As String
Dim PathDest As String
Dim FileName As String
PathSource = "C:\ASource\"
PathDest = "C:\ADest\"
FileName = "Test.xls"
FileCopy PathSource & FileName, PathDest & FileName
End Sub
I want to move (not copy) a file from one folder to another folder. I tried
the following test macro and I got a #70 error "Permission denied" on the
"FileCopy" line of code. What is the proper code to move a file? Thanks
for your time. Otto
PS: My computer is a sole home computer, not hooked up to any network at
all.
Sub TestMove()
Dim PathSource As String
Dim PathDest As String
Dim FileName As String
PathSource = "C:\ASource\"
PathDest = "C:\ADest\"
FileName = "Test.xls"
FileCopy PathSource & FileName, PathDest & FileName
End Sub