Hello,
i try to copy the second line from a txt, that works great problem is now i try to make an if-statement that check the txt, is there something in line 2.
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile("testfile.txt", True)
MyFile.WriteLine("" + LastMessage + "")
MyFile.Close
rownumber = 0
file = "testfile.txt"
Set fs = CreateObject("Scripting.FileSystemObject")
Set File = fs.OpenTextFile(file , 1, true)
Do While not file.AtEndOfStream
rownumber = rownumber+1
row = (file.ReadLine)
if rownumber = 2 then
new = row
msgbox row
end if
If row = 0 Then
msgbox "nothing found"
else
msgbox "found"
end if
Loop
The if row = 0 will not work, has some one an idea?
Error Message: Incompatible types: '[string:""]'
Line: If row = 0 Then
Regards, matthias