Export date in filename

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I am writing a macro at the moment - i want to output the results of a query
into an excel, with the date the macro was run, so the filename is
cancellations20051229.xls is there any way of doing this?

Thanks
 
Use this expression as the filename argument in the TransferSpreadsheet
action:

="C:\MyFolder\cancellations" & Format(Date(), "yyyymmdd") & ".xls"
 
Back
Top