Haven't gotten a response from Mr.Excel about this so...the first code example in the new book from Mr. Excel doesn't produce the error that it is said it will. This is the one that uses the sample data "invoice.txt, invoice2.txt" and more. You're supposed to record a macro using absolute reference to import these text files to Excel. The first file is "import.txt", so you start the recorder and navigate to that file and bring it into the spreadsheet with this line: Workbooks.OpenText Filename:="C:\somepath\invoice.txt".
So then you're to import another file, "invoice2.txt" and run the macro, which produces poor results. It positions the Total row in the middle of this file (roughly) because "invoice2.txt" has several more rows than "invoice.txt", this because you have used absolute reference. The thing is, of course, when you run the macro it doesn't bring the 2d file because the first line calls for the first file again, "invoice.txt". So how would one write the code to be flexible in calling for different files?
So then you're to import another file, "invoice2.txt" and run the macro, which produces poor results. It positions the Total row in the middle of this file (roughly) because "invoice2.txt" has several more rows than "invoice.txt", this because you have used absolute reference. The thing is, of course, when you run the macro it doesn't bring the 2d file because the first line calls for the first file again, "invoice.txt". So how would one write the code to be flexible in calling for different files?