I am modifying an existing macro that I use to manually set a variable ‘varList’ to a list of numbers. Now I have the macro read and text file ‘Numbers.txt’ and sets the ‘varList’ for me. The text file is nothing more then a bunch of numbers such as:
10000
10001
10007
10200
The macro then acts on each line, doing a variety of things, and appends to a text file ‘Log.txt’ so I have a record of what was done with that number. This appending to the file works great.
What I need to do is overwrite or edit the ‘Numbers.txt’ file so the top number is removed when it was already used. This is because I may have a very long list of numbers and I must stop the macro and then I need it to start off where I had stopped it the next time I run the macro. As an example after the macro looped once through the content of the ‘Numbers.txt’ file would be:
10001
10007
10200
I am guessing there may be a Filter option I can do to the ‘varList’ variable and then write that variable to the ‘Numbers.txt’ file but I am not finding a way to do that.
The net result would be my ‘Numbers.txt’ file would get a shorter list and my ‘Log.txt’ file would get a longer list of numbers.
Any help would be greatly appreciated!