vba copy file code example
Example: vba copy file
' Reference needed: "Microsoft Scripting Runtime"
Dim fso As Object
Set fso = VBA.CreateObject("Scripting.FileSystemObject")
fso.CopyFile(source, destination[, overwrite] )
' Or: overrides a non opened file:
FileCopy source, destination