Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

timestamp as part of csv filename 1

Status
Not open for further replies.

mart10

MIS
Nov 2, 2007
394
GB
I am using an Excel 2007 XLSM workbook tempate to grab some data and by running of a macro save as a csv file to a server location ready to be imported

Ideal when saving the csv file I want to add the date extension so instead of FX_Rates.csv I want FX_Rates_20130507.csv for example for 7th May 2013

How can I do this? At the moment my macro says:

ActiveWorkbook.SaveAs Filename:= _
"\\Wcrwvsqlprd07\salmonapplication$\Arqiva_Salmon\Import\Bloomberg\FX Rates\Fx data.csv", FileFormat:=xlCSV, _
CreateBackup:=False
 
Make the Filename dynamic:
Filename:= "\\Wcrwvsqlprd07\salmonapplication$\Arqiva_Salmon\Import\Bloomberg\FX Rates\Fx_Rates" & Format(date,"yyyymmdd") & ".csv"

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top