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

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
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,221,902
Messages
6,162,724
Members
451,782
Latest member
LizN

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