Transferspreadsheet

susanmgarrett

Registered User.
Local time
Today, 11:36
Joined
Dec 7, 2004
Messages
41
I'm attempting to save the data in a table to an excel spreadsheet using the Transferspreadsheet command in a Macro.

I don't know VBA.

Transferspreadsheet is the only command I have in the macro. I've listed the table, the location of the spreadsheet name, the spreadsheet name . . . everything.

I saved the macro, ran it . . . and nothing. No errors, but no spreadsheet either.

Do I need to open the table before running that command?

Thanks!

Susan
 
Now is a great time to learn.

Code:
DoCmd.TransferSpreadsheet Export,acSpreadsheetTypeExcel9 , "YourTableName", "C:\YourOutputLocation.xls",  True
Macros do not allow you to handle runtime errors and you will need it when exporting/importing data.

No the table does not need to be open to transfer data.
 
Looks good . . . but need more help please.

I really AM a newbie when it comes to VBA.

Where would I place this code?

Thanks!

Susan
 
Try the OnClick event of a command button.
 

Users who are viewing this thread

Back
Top Bottom