Export Data to Excel

  • Thread starter Thread starter Mehmet Ceylan
  • Start date Start date
M

Mehmet Ceylan

How can I export the data to an excel file from a listbox on the form?
 
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.
 

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

Back
Top