Access VBA import Excel file to temporary Access table

Access VBA import Excel file to temporary Access table

This VBA will import an excel file into Access and create a new table for it.  Change FullCurrFileLocation with the file path for your file.  You can change “Temp_Table” to be the name that you want your Access table to have.

 

 'Import Excel table to temporary access table'
 FullCurrFileLocation = "X:\IMD\SL\ExecutionServices\Fixed Income Matrix.xlsx"
 DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel8, "Temp_Table", FullCurrFileLocation, True

Interested in learning new skills?