upobDaPlaya
asked on
Excel VBA FileCopy Permission Denied - Need a way to still copy the file
In Excel VBA I use the FileCopy statement to copy a file to another location. However, how do I accomplish FileCopy if someone has the file open ? My current FileCopy statement results in Permission Denied Error 70 if someone has the file open.
However, I noticed if the File is Open and I go to Windows explorer and I copy the file and then paste the file in any location I do not have any issue.
How can I accomplish FileCopy even if someone has the file open ?
However, I noticed if the File is Open and I go to Windows explorer and I copy the file and then paste the file in any location I do not have any issue.
How can I accomplish FileCopy even if someone has the file open ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The FileCopy VBA statement is available as a simple method to copy a file. It uses a different method in the background from fso.CopyFile.
ASKER
Thank you Wayne !
ASKER