• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 580
  • Last Modified:

Access VBA - export table to Excel and rename the table


What VBA code would I use to export a table from Access into Excel?
Murray Brown
Murray Brown
2 Solutions
Rey Obrero (Capricorn1)Commented:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "TableName", "c:\MyExcelFile.xls", True
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
This code will do it:

DoCmd.TransferSpreadsheet acExport, , "YourTable", "Full path to your excel file", True

See this help file link:
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
As always. Great answer. Thanks very much
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now