TransferSpreadsheet question

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I export the same table every week is there a way to rename the tabs on
export using TransferSpreadsheet? Something like products and the current
date. Thanks! Jeff
 
I think there are a few things you can do:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9,
"YourExcelSheet", _
"YourExcelSheet " & Format(Date, "MMDDYY") & ".xls", True

You can use DateAdd() do get this:
"Central Western Liability " & Format(DateAdd(Date()), "MMDDYY") & ".xls",
True

"C:\MyFolder\Filename" & Format(Date(), "MMDDYY") & ".xls"

HTH,
Ryan---
 
Thanks Ryan! This creates a new file every week. I would like to keep the
same file and just creat a new sheet. Do you know if there is a way to do
that?
Thanks!
Jeff
 
Back
Top