View Full Version : Import whole folder using TransferSpreadsheet


USMCFROSTY
11-02-2011, 07:33 AM
The code below works fine but how can i import all .xls within the folder. Can i rename the .xls to .xls1, .xls2, ect... then import the folder? How would i change the code to id them all then import?

Private Sub Command0_Click()
DoCmd.TransferSpreadsheet acImport, acSpreadsheetTypeExcel9, _
"AutoImportTest", "C:\Documents and Settings\me\Desktop\ImportTest.xls", True
End Sub

the_net_2.0
11-02-2011, 02:42 PM
my faq in the faq section here might help you. I think the title of the thread is something like "Import Multiple Spreadsheets". Search for it.