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

Access VBA - export table to Excel and rename the table

Hi

What VBA code would I use to export a table from Access into Excel?
Thanks
0
Murray Brown
Asked:
Murray Brown
2 Solutions
 
Rey Obrero (Capricorn1)Commented:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "TableName", "c:\MyExcelFile.xls", True
0
 
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:
http://msdn.microsoft.com/en-us/library/aa220766%28v=office.11%29.aspx
0
 
Murray BrownMicrosoft Cloud Azure/Excel Solution DeveloperAuthor Commented:
As always. Great answer. Thanks very much
0
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

Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

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