hello! I need to use this for loop to extract specific data from a text file. But it gives me an error message:syntax error.I hope you don't mind helping. Thank you for your time and effort.
Below is my codes:
OpenFileDialog1.ShowDialog()
Dim a As String
TextBox2.Text = OpenFileDialog1.FileName
a = TextBox2.Text
Dim objStreamReader As New StreamReader(TextBox2.Text)
for each i as StreamReader
objStreamReader.ReadLine()
TextBox4.Text = (objStreamReader.ReadLine())
Label2.Text = TextBox4.Text.Substring(0, 3)
Next
objStreamReader.Close()