How can I export multiple queries to the same excel file?

B

bdmsfan

How can I export multiple queries to the same excel file? Is it possible to
do it with a Macro and the OutputTo action? or do I need to do it using VB
modules.
Thanks
 
K

Ken Snell [MVP]

Use a macro to run the TransferSpreadsheet action. So long as each query has
a different name, you can use the same EXCEL filename and each query will be
written to its own worksheet within that file.

You also can do this via VBA code using DoCmd.TransferSpreadsheet.
 
Top