OutoutTo acQuery acFormayXLS

  • Thread starter Thread starter Adam P.
  • Start date Start date
-----Original Message-----
How do you output different objects to different sheets
in one Excel file?

To answer my own question, the following will append
multiple queries to one sheet in excel:

DoCmd.TransferSpreadsheet acExport,
acSpreadsheetTypeExcel9, "File name", "File path\File
name.xls"

Or, you can use this code to make multiple sheets:

DoCmd.OutputTo acOutputQuery, "File name",
acFormatXLS, "File path\File name.xls"
 
Back
Top