Exporting data from access to excel

  • Thread starter Thread starter Simon Jelinek
  • Start date Start date
S

Simon Jelinek

I am trying to create macro i want to export several
queries to one excel file. In the macro you can select the
OutputTo
Object type : Query
Object name : Qry 1
Output format: Microsoft Excel (*.xls)
Output File : PAth1\path2\path3\file name

under the macro i would like to select another query with
the dat1 to be exported into the same file but not over
the top and not as seprate file. The ability to select a
specific sheet would be useful.

Thanks in advance
 
Use TransferSpreadsheet instead of OutputTo. TransferSrpeadsheet allows you
to wirte to multiple worksheets in the EXCEL file. However, you cannot
specify the worksheets...each time you run TransferSpreadsheet, it writes
the data to a new sheet in that file.
 
Thanks but when i try to use transfer spreadsheet function
it returns an object definition but does not execute the
macro

Simon
 
Back
Top