Need help on two things
1)Macros to import multiple Csv files into Access. I have multiple Csv file around 60+, importing each and very file in MSAccess2003
will certainly take time. When googled got the following code but it is not working for meImport_multi_csv()
Dim fs, fldr, fls, fl
Set fs = CreateObject("Scripting.FileSystemObject")
Set fldr = fs.getfolder("D:CSVFolder\")
Set fls = fldr.files
For Each fl In fls
If Right(fl.Name, 4) = ".csv" Then
DoCmd.TransferText acImportDelim, , "tblName", " D:CSVFolder \" & fl.Name, True
End If
Next fl
2)Any Macro available to import specific coulmn from multiple csv files into MSAccess2003?
A开发者_如何学JAVAny help is greatly appreciated.
First of all I agree with 'HansUp', you are definately missing the \ which should follow the drive letter, secondly I believe it is always good to declare your variables correctly, you have set fs, fldr, and fls ok, but then it immediately asks for each fl in fls, it may not be 100% necessary but in my experience it would be good to declare as follows:
Dim fl as File
精彩评论