FSO copy file returns permission denied
Tim,
Thanks for reply.
I have admin rights on this PC.
I am able to copy, paste & delete in both the folders.
If I save any excel file in both folders, no problem.
This error comes up only while I use FSO in VBA.
Any thoughts?
Regards,
Madiya
On Tuesday, 3 April 2012 01:17:22 UTC+5:30, Tim Williams wrote:
Possibly you don't have either the permissions required to read the original file, or the permissions required to write to the new location.
Tim
On Monday, April 2, 2012 5:41:25 AM UTC-7, Madiya wrote:
I am trying to copy a file by fso by i am getting error 70 (permission denied).
I have admin rights on the pc.
Here is the code.
Sub COPY_INVOICES()
Dim inv As String
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
FILETO = InputBox("PL ENTER FULL PATH WHERE YOU WANT TO COPY FILES", "PATH")
FILEFROM = "C:\INVPDF\" & Range(A1").value & ".pdf"
fso.CopyFile FILEFROM, FILETO
End Sub
I am entering full path in inputbox.
Pl help to resolve.
Regards,
Madiya
|