Hi
The problem is that the code cant find word flowers from *.txt file. I added msgbox & looped all 5 lines & I see that the flowers are there. if i change flowers to BIOS, then the code will find the word. So im little lost hire, Why it cant find flowers?
*txt file contents:Code:Dim myOpenFileDialog As New OpenFileDialog() myOpenFileDialog.CheckFileExists = True myOpenFileDialog.DefaultExt = "txt" myOpenFileDialog.InitialDirectory = "C:\" myOpenFileDialog.Multiselect = False If myOpenFileDialog.ShowDialog = DialogResult.OK Then Dim a() As String = Split(My.Computer.FileSystem.ReadAllText(myOpenFileDialog.FileName), Environment.NewLine) Dim r As Integer Dim i As Integer For i = 0 To a.GetUpperBound(0) r = a(i).IndexOf("flowers") If r > 0 Then ' if found flowers MsgBox("Found word,:" & a(i)) Exit For End If Next End If
Code:[BIOS] Ver=AB60S00P [BIOS] Ver=AB60S00P flowers



Reply With Quote
