TransferSpreadsheet question

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
 
R

ryguy7272

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---
 
J

Jeff

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
 

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

Top