Export queries to Excel - TransferSpreadsheet / TransferDatabase

paul_mcc

Registered User.
Local time
Today, 04:47
Joined
Jul 16, 2012
Messages
19
Hi all,

I'm trying to populate an Excel spreadsheet with information captured by Access queries.

I figured the easiest way to do this (as there will be many queries) would be to build a macro for each query and then run a macro that runs all those macros, populating the relevant parts of the spreadsheet in one hit (please correct me if there's a better approach).

It seems that the TransferDatabase function would be the best way to achieve the actual transfer, so that I can have all the data exported to the spreadsheet without the table headings.

I've tried writing the code following other examples online, to no avail. Could someone please tell me how to write it?

I'm using Excel 2010 and Access 2007-10.

Many thanks in advance,
Paul McCarthy
 
Last edited:
Hi,

TransferSpreadSheat creates a new file at each activation.
This is basic code for exporting to an existing Excel. Work awound it, you can see how change location on the sheet, remove headers, and turn visabilty off in process.

ATB
 
Thanks Marlan! much appreciated.
 

Users who are viewing this thread

Back
Top Bottom