I have a VBA Excel macro that takes text from txt files to add to another text file. Part of the code is:
Open FilePath For Input As #3
Do Until EOF(3)
Line Input #3, texttowrite
MsgBox texttowrite 'this is just to test
Print #2, texttowrite
Loop
I have built text files that I open as #3 using wordpad, notepad, and MS Word (saved as txt). Regardless, the very first line of the text file (as found in file #2 and displayed in the MsgBox) starts with three strange characters: ?
Those characters do not show up in the file I read from (opened as #3) using notepad, word pad, etc. However, they do show up in the file I am writing to (#2) using any program as well as in the MsgBox I added to debug.
The characters are not on any other line. Other than those characters at the start of the first line there are no problems. The program is building html web pages from data and files listed in an Excel spread sheet and works perfectly except for the ? in the first lines.
Where do the characters come from?