Right here is my issue,
What i want to achieve using streamreader is to read between particular rows in a text file, and only out put the data in between the rows and continue for each item in the document. For example
Text Start
1
2
3
Text End
So i have some code that says if line contains text start then output the code after that until it reads text end. I can get it to either out put the entire document or out put any lines that read text start. Here is my code...
While lineoftext IsNot Nothing
If lineoftext.Contains("Text Start") Then
txtResults.Text = txtResults.Text & srIn.ReadLine & vbNewLine
End If
lineoftext = srIn.ReadLine()
End While
Can anyone see where im going wrong?
What i want to achieve using streamreader is to read between particular rows in a text file, and only out put the data in between the rows and continue for each item in the document. For example
Text Start
1
2
3
Text End
So i have some code that says if line contains text start then output the code after that until it reads text end. I can get it to either out put the entire document or out put any lines that read text start. Here is my code...
While lineoftext IsNot Nothing
If lineoftext.Contains("Text Start") Then
txtResults.Text = txtResults.Text & srIn.ReadLine & vbNewLine
End If
lineoftext = srIn.ReadLine()
End While
Can anyone see where im going wrong?