Exporting data to different excel sheets of same file

Mansoor Ahmad

Registered User.
Local time
Today, 22:57
Joined
Jan 20, 2003
Messages
140
Dear All

I want to export data from access to excel using following code. My question is how is it possible to export data from two different queries into one excel file which already has got some data in it.

DoCmd.TransferSpreadsheet acExport, 8, "Q_Query1", "C:\New.xls", True, ""

DoCmd.TransferSpreadsheet acExport, 8, "Q_Query2", "C:\New.xls, Ture, ""

Dim XLAddress As String

XLAddress = ("C:\New.xls")

So basically I have an excel file with some data on sheet 1 & 2. I want the data from Query1 and Query2 to be exported in sheet3 and sheet4 of the same file.

Thanks
 

Users who are viewing this thread

Back
Top Bottom