Export Help

H

HELP

I am new to VBA. I am trying to export multiple queries into Excel. However,
I would like them to appear in different tabs. Each query in its own tab.
Currently it is pasting all the queries on one sheet. Below is what I have in
the database:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3, "ActualSales",
"C:\Scorecard Data\Test", True
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3, "GrossInv",
"C:\Scorecard Data\Test", True


Any help would be appreciated.

Thank you
 
S

Steven

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel3, "ActualSales",
"C:\Scorecard Data\Test", True, "SheetName"

or if using a variable then no quotes.
 

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