Excel 2010 and its Microsoft Office stablemate Access 2010 work hand-in-hand when you need to import Excel data into an Access database. The “DoCmd” object contains the “TransferSpreadsheet” method for importing a spreadsheet into Access from Excel using Visual Basic for Applications. This method also supports other file formats, such as Lotus. Similarly, you can use the same method to export data from Access to Excel by changing the “AcDataTransferType” enumeration to “acExport.” Private Sub importExcelSpreadsheet() Press Enter on your keyboard to create the End Sub for the procedure. DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _ “Employees”, “C:\Employees.xlsx”, True Writer Bio

How to Transfer 2010 Excel Spreadsheet to Access 2010 Using VBA - 68