Import multiple txt files into single Access 2013 table

AndyDevine1

Board Regular
Joined
Jun 1, 2006
Messages
172
Hi guys

I've tried to find a post which relates to importing txt files into a single Access table (i have 100 to import, all with the same format headers)

I've found code on posts which does not work as, upon further investigation, some of the code eg "FileSearch" will not work in my versions of Access, Access 2013

Can anyone help me with the code please?

I can modify it to read from correct folder etc

Many thanks

Andy
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Thanks for that

I've run the code and I get "user defined type not defined" error message at "Dim FSO As New FileSystemObject"

Also, should the code work for all file types not just excel?

Can you help?

Thanks
 
Upvote 0
You will need to add the appropriate Library references to use code that uses File System Objects or DAO. But if you look at the last post in that thread, I think the code there does not require anything like that.
 
Upvote 0

Forum statistics

Threads
1,223,261
Messages
6,171,076
Members
452,377
Latest member
bradfordsam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top