We can easily add the vbcrlf codes to Andy's routine if you want that.
Here is one method that I have used. Add these to a new workbook and run from a blank Sheet1 for example.
Notice that I replaced the tabs with a space character. You can use a comma as I did in the second Sub t example. After this snippet, I will show how to create it as a comma separated file. The 3rd part will show how to poke the text file's data back into Excel.
Add the other Subs and Functions and this new Sub for the comma separated example text file.
Now, we go to another sheet and play this code to see if we get the data from Fruit.txt inserted properly. You can put all of these Functions into their own Module.
Bookmarks