I need a very simple macro to copy a file from one folder to another. Based on some internet searches I came across Ron DeBruin's webpage for this and attempted to use the one file copy. I also looked at the MS documentation for FileCopy
My one line of code in the macro (wrapped in the Sub and EndSub of course) would be:
When I run this, the error I get is "Compile Error: Syntax Error"
My understanding of the FileCopy is it should be FileCopy (Source as string, Destination as string). I assume "as string" means to wrap it in double quotes like above.
What am i missing here?
Any help would be greatly appreciated. I am sure it is something simple I have overlooked.
T
My one line of code in the macro (wrapped in the Sub and EndSub of course) would be:
Code:
FileCopy ("H:\SourceFolder\SourceFileExample.xlsx", "H:\DestinationFolder\SourceFileExample.xlsx")
When I run this, the error I get is "Compile Error: Syntax Error"
My understanding of the FileCopy is it should be FileCopy (Source as string, Destination as string). I assume "as string" means to wrap it in double quotes like above.
What am i missing here?
Any help would be greatly appreciated. I am sure it is something simple I have overlooked.
T