If that doesn't work, let me know.[/QUOTE]
it worked partially.
Actually, the empty line used to be three lines there. The code I used to write the text file do add an empty line, while yours do add two, making three altogether.
So this code you gave me
If InStr(1, MyResult, vbCrLf & MyLines(i) & vbCrLf, vbTextCompare) = 0 And MyLines(i) <> "" Then