IncredibleVolk
Technical User
I can't understand why this doesn't work and I was hoping someone can help me. I want to exclude certain lines from a text file based on conditions. This is giving me a result when I print out the msgbox but the file I'm writing to is coming up empty. Basically I want to keep everything where the line is at least 45 characters but I want to exclude lines where a certain position in the string contains information.
if Len(strCurrentLine) > 45 and len(Mid(strCurrentLine, 36, 6)) = 0 then
objFilesTarget.WriteLine strCurrentLine
if Len(strCurrentLine) > 45 and len(Mid(strCurrentLine, 36, 6)) = 0 then
objFilesTarget.WriteLine strCurrentLine