I have been searching for an answer online, and I am getting sporadic results.

I would like to bring in the data from about 8 text files (actually .rpt files) located in a folder on my computer. I would like to have a VBA code that will loop through the folder, import the data from the files and insert them all in the same worksheet -named 'DATA' in succeeding columns. With this data in place, I can run a macro that I have already built. At this point in time, I have to manually open the file in word, run a data-selection macro, go back to excel and run the macro there.

Any help or direction would be greatly appreciated. I will use this code continually, with varying number of files, so it should have the flexibility to import 8 or import 3.

Adam