Macro to Export Query Data to Excel Spreadsheet

S

Sara

Hello,

I have read through a number of threads and have tried the suggested methods
but I still can't seem to get this to work. I am trying to create a Macro
(using TransferSpreadsheet) to export data from a query to an Excel
Spreadsheet. I would LIKE it to dump the data into an already create
worksheet but I can't get it to.

The name of the query is "B001 PSA". I created a brand new workbook
formatted the way I want and named the tab B001. I have tried putting "B001!"
in the Range column and it tells me "B001'$'" already exists. If I leave the
"!" off, it just creates a new worksheet titled "_B001". I even tried putting
B001!A:H and it tells me those cells already exist. I tried naming the
worksheet tab "B001_PSA" but then it creates "B001_PSA1".

Is this possible or am I stuck manually formatting the Excel spreadsheet?

Btw, I'm using Office 2007.

Thanks!

-Sara
 
C

Clifford Bass

Hi Sara,

Untried: Mybe go about it in reverse. How about creating a macro in
the Excel document to clear out the current data and reimport it?

Clifford Bass
 

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