Creating a macro to export 2 select querys to a single excell book

k0r54

Registered User.
Local time
Today, 17:20
Joined
Sep 26, 2005
Messages
94
Hi,

How can I export 2 seperate select querys into a single excell workbook. I have tried transferspreadsheet but it just does one (apart from i cant get it to pick up the query, just tables). I need it to put one query into a 1 and and the 2nd query into another sheet preferably being able to name the sheets.


I have been trying for couple days with no luck.

Please let me know and thanks in advanced

Adam
 
This will work with Transferspreadsheet

What you need to do in your macro is create two actions both set to Transferspreadsheet and it will run one after the other.

Where it says Table name - Type in the full name of your Query
FileName: This will contain the path to your spreadsheet/spreadsheet name and will be exactly the same as the file name in the first Transferspreadsheet action.

You will end up with two worksheets in your spreadsheet. The worksheets will be named the same as the query name.

Hay
 

Users who are viewing this thread

Back
Top Bottom