Forum Discussion

The_Real_Phil_S's avatar
The_Real_Phil_S
Copper Contributor
May 21, 2022
Solved

Access VBA Syntax for Excel Output

Hi Guys   I am trying to update an Access application. Currently there is VBA code included to output results in Excel format. The application is old so the output files produced are in an old Ex...
  • isladogs's avatar
    May 21, 2022

    To export as .xlsx file use one of the following:

     

    DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel12Xml, "exceltemp", "G:\DM_Report_Test\temp.xlsx"

     

    OR 

     

    DoCmd.TransferSpreadsheet acExport, 10, "exceltemp", "G:\DM_Report_Test\temp.xlsx"

     

Resources