I'm trying to write a Macro in Excel that will process all the text files in a particular folder by displaying them in their own tab, and plotting a graph containing all the data. I have gotten as far as writing code for processing one file, but don't know how to go about applying the Macro to all the files. The code I have so far is below. If anyone has any ideas on how to finish it I'd really appreciate it! Thanks.
Sub PeelTest()
'
' PeelTest Macro
'convert .txt to excell & plot graphs
'needs total.xlsx to be open & empty (1 empty sheet) - all selected .txt files put here