View Full Version : Creating a macro to export 2 select querys to a single excell book


k0r54
10-27-2005, 01:36 AM
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

Hayley Baxter
10-27-2005, 01:56 AM
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