Macro to Append Records

DBFIN

Registered User.
Local time
Yesterday, 21:02
Joined
May 10, 2007
Messages
205
I want to export a MS Access table to an MS Excel file. When I run the macro using the transfer database function it overwrites the excel destination file. I want to append records to the destination file instead of overwriting the destination file. Is this possible using the transfer database function ? If so, how do I accomplish this ?
 
Last edited:
No that is not possible using the transferspreadsheet function. This allways creates a new file/tab. Sorry.

You can create a tab, open the excelsheet in code (offcourse hidden from the user) then copy the data to its place, remove the "extra" tab and save again. This would work, tho somewhat complex.

If the spreadsheet is "build" over time via your database the easiest way is to keep a full copy in your DB and export a new file every time...
Or alternatively, import the excisting spreadsheet first. Then combine your export with the excisting sheet and create the new combined file.

Good luck :)
 

Users who are viewing this thread

Back
Top Bottom