Dear CWIZO, Here is my code below, with this code, I can read how many lines that met the condition, but I can not read the second line. Can you help me out. I would appreciate your potential helps very much, Private Sub BtnSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSend.Click Dim Start As String = "Start" Dim intTotalCount As Integer intTotalCount = CountStringInFile(strFile, Start) **<--HERE, I CAN READ HOW MANY LINE MET THE CONDITION** end Sub Private Function CountStringInFile(ByVal FilePath As String, ByVal StringToLookFor As String) As Integer Dim strContent As String = "" 'Get a StreamReaderclass that can be used to read the file Dim objStreamReader As StreamReader Dim intCount As Integer Dim intCountahead As Integer = 1 objStreamReader = File.OpenText(FilePath) While objStreamReader.Peek <> -1 strContent = objStreamReader.ReadLine intCount += CountLineByLine(strContent, StringToLookFor) End While 'Close the stream objStreamReader.Close() objStreamReader = Nothing Return intCount End Function Private Function CountLineByLine(ByVal vstr As String, ByVal strToSearch As String) As Integer Dim intIndex As Integer Dim intCount As Integer = 0 intIndex = InStr(vstr, strToSearch) While intIndex > 0 intCount += 1 intIndex = InStr(intIndex + 1, vstr, strToSearch) End While Return intCount End Function