Export to Excell with Date Extention

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

Guest

I'm trying to write a Macro to export a table to Excel. I want to name the
file so it has the current date in the file name (date the file is created or
Macro is ran) i.e. "AccessReportFile 20061026.xls".

I can't find this anywhere in Access or Excel help menu.
 
Steve, I still can't get a table to export to an Excel table with date in the
Excel File Name. I also tried Transfere Spreadsheet command - no luck...
Here is my file name: T:\REPORTS\Affordable Housing Contracts
"&Format(Date()," mm-dd-yy") &".xls

I receive Failure Creating File error message.

TIA for your help!
 
Cjaaron,

You'll need to do it in the format I suggested. Your example is missing
the = and missing some "s and missing some spoaces and has another space
in the wrong place. Like this:
="T:\REPORTS\Affordable Housing Contracts " &
Format(Date(),"mm-dd-yy") & ".xls"

Yes, TransferSpreadsheet is the way to go, I'd say.
 
WOW HOOO! THANKS!!!!

cjaaron

Steve Schapel said:
Cjaaron,

You'll need to do it in the format I suggested. Your example is missing
the = and missing some "s and missing some spoaces and has another space
in the wrong place. Like this:
="T:\REPORTS\Affordable Housing Contracts " &
Format(Date(),"mm-dd-yy") & ".xls"

Yes, TransferSpreadsheet is the way to go, I'd say.
 
Back
Top