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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top