![]() |
Copy Paste a file into a folder with the current date
Hi Guys,
I currently have a problem with the following Sub: -------------------------------------------------------------- Sub CopyFiles() 'Create the folder with the current date MkDir "S:\Aat\APA acc\GEOFFROY\CPI Mensuels\ALL APA Positions \Database_" & Format(Date, "yyyymmdd") 'Copy the files created with Olympic Set newDir = "(s:\Aat\APA acc\GEOFFROY\CPI Mensuels\ALL APA Positions \Database_) & Format(Date, "yyyymmdd")))) Dim SourceFile, DestinationFile SourceFile = "Q:\Products\Aat\APA Database\Bonds Database \fapa_bonds.xls" ' Define source file name. DestinationFile = newDir FileCopy SourceFile, DestinationFile ' Copy source to target. End Sub -------------------------------------------------------------- I managed to create the folder with the current date but I can't move the file to the new folder since the line Set newDir = ... gives an error I am a beginner so I dunnot master the "" and the (), so please be nice with me :-) Thanks a lot guys, hope I will help you one day, Mike |
All times are GMT +1. The time now is 10:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com