Hello
the following code works great for importing Excel sheets into an Access table.
The only issue is, the InputPath contain around 29 subfolders that sit within the Testing folder.
Ideally I would like to alter this code slightly so it looks in those subfolders.
Many thanks
the following code works great for importing Excel sheets into an Access table.
The only issue is, the InputPath contain around 29 subfolders that sit within the Testing folder.
Ideally I would like to alter this code slightly so it looks in those subfolders.
Many thanks
Code:
Public Function Import_Multi_Excel_Files()
Dim InputFile As String
Dim InputPath As String
InputPath = "S:\Change Impacts\Testing[URL="file:///\\enter%20path%20here\"]\[/URL]"
InputFile = Dir(InputPath & "*.xls")
Do While InputFile <> ""
DoCmd.TransferSpreadsheet acImport, , "[I]entertablename[/I]", InputPath & InputFile, True '< The true is for column headers
InputFile = Dir
Loop