hi all
i search about statement in text file by this code :
but the problem some times the text file contains less than 15 lines and the program get out of if statement.
i want search about statement without write the line number .
i want the program search about statement in file without specified line number .
example :
the program search in text file about this statement : "Transfer completed successfully".
if the program found this statement in any place in text file it shows message box .
thank you
i search about statement in text file by this code :
Code:
LineFlag = LineFlag + 1
Line Input #1, strLine
If LineFlag = 15 Then
If InStr(1, strLine, " Transfer completed successfully.") <> 0 Then
MsgBox "successful"
Else
MsgBox "failed", vbExclamation, ""
End If
End If
i want search about statement without write the line number .
i want the program search about statement in file without specified line number .
example :
the program search in text file about this statement : "Transfer completed successfully".
if the program found this statement in any place in text file it shows message box .
thank you
Comment