arkk
New Member
Hi all,
I am trying to copy a file from a directory using relative path in a macro. This code WORKED a couple of minutes ago and now its complaining not sure why?? any help appreciated.
Many Thanks.
Post Moved to relevant forum section by Mod.
.
I am trying to copy a file from a directory using relative path in a macro. This code WORKED a couple of minutes ago and now its complaining not sure why?? any help appreciated.
Code:
Sub copyfile()
Dim fso As Object
Set fso = VBA.CreateObject("Scripting.FileSystemObject")
'Call fso.copyfile("./poc/Adata.xlsx", "./Adata1.xlsx", True) ' path not found???
Call fso.copyfile("./Adata.xlsx", "./Adata1.xlsx", True) ' file not found??
End Sub
Many Thanks.
Post Moved to relevant forum section by Mod.
.
Last edited by a moderator: