Did you resolve the blank lines problem? If not, then something like this should do the trick:
' Replace
If strCheck <or part of it> = <some validation check> Then <take some action>
' with
If strCheck <> "" AND strCheck = <some validation check> Then <take some action>
Ged
================================================================
: I am Sorry, it is the problem with file. There are blank rows in file, so it is giving an error.
:
: Thanks for valuable help ... Ged.
:
: : Hi,
: :
: : You understand my need. But when I try to do so (with the code given), for first line it is reading data but from next line it is not.
: :
: : Thanks for your help, plz help me on this issue too.
: :
: : regards,
: : Venkat.
: :
: : : Hi
: : :
: : : You can test each line at a time with code like this:
: : :
: : : Dim strFileName As String = Directory.GetCurrentDirectory() & "\MyFile.txt" ' pointer to file
: : : Dim txtFile As New FileStream(strFileName, FileMode.Open, FileAccess.Read)
: : : Dim FileStream As New StreamReader(txtFile)
: : : Dim strCheck As String ' Temp string for ReadLine
: : :
: : : Do Until FileStream.Peek = -1 ' Read until end of file
: : : strCheck = FileStream.ReadLine ' Next line into string
: : : ' Test
: : : If strCheck <or part of it> = <some validation check> Then <take some action>
: : : Loop
: : :
: : :
: : : Did I understand your question correctly? If not, please do post a follow up and I'll try harder

: : :
: : : Ged
: : :
: :
: :
:
: