Output to filename with datestamp?

J

JohnK

I have a database that I need to save a file as an xls document. It works
fine but I hoped to have the filename be name + systemdate.xls. I can get it
to be name.xls which overwrites each time. Is there a way to set up this
macr so that it will append date() to the filename?
 
K

Ken Snell [MVP]

Or

NewFileName = FileName & Format(Date(), "ddmmyyyy") & ".xls"

Or

NewFileName = FileName & Format(Date(), "mmddyyyy") & ".xls"

Or..... many other options.
 
Top