Exporting seceral queried to multiple tabs in one Excel spreadsheet

P

Phil Smith

7 different queries, one for each territory. I want to automatically
send each of those into it's own worksheet of the same workbook.

How?
 
R

Roger Carlson

Use the TransferSpreadsheet method. The easiest way to do it is to create a
Macro, select the TransferSpreadsheet Action, fill in the information. Copy
this action as many times as you need. Change the name of the Query to be
transfered in each line, but leave the workbook name the same. Each query
will be exported to the same workbook on a different sheet.

If you want it as VBA code (I recommend it), save the macro AS a VB module
and it will translate the macro actions into code.

If you want a more robust process, on my website
(www.rogersaccesslibrary.com), is a small Access database sample called
"ExportToExcel.mdb" which illustrates how to do this. You can find it here:
http://www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=350. It
requires some programming knowledge, however.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top