Export Data to Excel

  • Thread starter Thread starter Mehmet Ceylan
  • Start date Start date
Hi:

If the data in List is from a table on based on a SQL statment use thhsi VBA
code on a button to do the excel export.

application.DoCmd.TransferSpreadsheet
acExport,acSpreadsheetTypeExcel3,"TableName","C:\My DOcuments\Test.xls"

Here TableName is the name of Table to export and is exported to Test.xls.

Regards,

Naresh Nichani
Microsoft Access MVP
 
Mehmet said:
How can I export the data to an excel file from a listbox on the
form?

If you want to start Excel at the same time, you could use "send keys"
to trigger the tools, office links, publish with Excel menu commands.
 
Back
Top