If blnStartReading1 = True And blnStartReading2 = False Then
i = InStr(strTestData, "174=")
ii = InStr(i + 1, strTestData, ";")
If i < ii And i <> 0 Then
strDepth = Mid(strTestData, i, ii - i)
End If
blnStartReading2 = True
End If
If strTestData = "EndHeader" Then blnStartReading1 = True
If strTestData = "STOP" Then blnStartReading2 = False
Wend
Close #2
End Sub
From the "text.txt" file,i only need the value inside "START 43, L, 174=0;133=300000" and "STOP" to change to the format below. By using the code above,i found mistake was happen(the blue color). i don't need to save the blue color value.
3.85663000 100.81888000 174=0
3.85625000 100.81778000 174=0
3.85519000 100.80883000 174=0
3.20013000 101.29401000 174=20
3.20232000 101.29359000 174=20
3.20748000 101.29134000 174=20
2.85667000 99.98843120 174=20
2.85667000 99.70000000 174=20
3.19926000 99.70000000 174=20
3.73802000 100.94623000 174=20
3.73897000 100.94658000 174=20
3.74430000 100.94950000 174=20
3.76365000 100.98286000 174=20