ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy a file in VBA (https://www.excelbanter.com/excel-programming/288163-copy-file-vba.html)

loggerhead

Copy a file in VBA
 
Whoa...new format, okay, I could get used to this!

I need to copy a closed file using VBA in Excel XP from one folder into another folder. I can't quite remember the syntax. Isn't it something like:

File [SourceFullName] Copy [DestinationPath]

Could someone please supply a complete example to clear me up?

Thanks in advance for your assist.

oinker

Copy a file in VBA
 
Sub CopyFiles()

FileCopy "C:\book1.xls", "S:\textbook1.xls"


End Sub
-----Original Message-----
Whoa...new format, okay, I could get used to this!

I need to copy a closed file using VBA in Excel XP from

one folder into another folder. I can't quite remember
the syntax. Isn't it something like:

File [SourceFullName] Copy [DestinationPath]

Could someone please supply a complete example to clear

me up?

Thanks in advance for your assist.
.



All times are GMT +1. The time now is 11:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com