Importing Multiple Excel Workbooks into Seperate Inexistant Tables

tcgaines

Registered User.
Local time
Yesterday, 23:29
Joined
Jul 21, 2005
Messages
27
The subject says it all. here is the code I'm currently using...

If .FoundFiles.Count > 0 Then
For fileLoop = 1 To .FoundFiles.Count
DoCmd.TransferSpreadsheet acImport, acSpreadsheet TypeExcel8, "tblFSOG", .Foundfiles(fileLoop)
Next fileLoop

Suggestions?

Thanks.
 
Last edited:
If I replace

"tblFSOG" in

DoCmd.TransferSpreadsheet acImport, acSpreadsheet TypeExcel8, "tblFSOG", .Foundfiles(fileLoop)

with:

fileLoop, then this somewhat solves my problem. Each of the spread sheets in the folder are imported into a seperate table.

NOw I am interested in retrieving the filenames of the xls docs. how would i do that? what is the vb method for getting file names?

thanks
 

Users who are viewing this thread

Back
Top Bottom