Exporting to Excel without overwriting the file

ppataki

Registered User.
Local time
Today, 05:27
Joined
Sep 5, 2008
Messages
267
Dear All,

I would like to export a table from Access to an exisitng Excel file to a specified worksheet
I tried DoCmd.TransferSpreadsheet but that command overwrites the whole excel file
How could I make Access overwrite only a worksheet in a workbook and not the whole workbook? (or even a specified range in a worksheet)

Many thanks in advance ;)
 
I have used this command many times and in my experience it only ever overwrites the worksheet. Have you tried using the TransferSpreadsheet action as a Macro (under objects)? If this works, you can always convert the Macro into VBA and compare this with your original code.
 
You are right, I was just not thorough with the testing

Thank you!!!
 

Users who are viewing this thread

Back
Top Bottom