Multi File import

dgaller

Registered User.
Local time
Yesterday, 21:03
Joined
Oct 31, 2007
Messages
60
I am currently using the following code to import multiple spreadsheets into a DB. Is there a way to prompt a user to select Multiple files instead of having them take everything in the folder?

Code:
Function Impo_allExcel()
 
Dim ImportDir As String, ImportFile As String
 
ImportDir = "C:\Files\Mass_import\"
ImportFile = Dir(ImportDir & "*")
Do While ImportFile <> ""
  DoCmd.TransferSpreadsheet acImport, 8, "Bid_by_State", ImportDir & ImportFile, True, "Bid_by_State!A1:R56"
 
  ImportFile = Dir
Loop
 
End Function
 

Users who are viewing this thread

Back
Top Bottom