maybe there is a much easier way however i am new to VStudio and used to OLD vb3 or 6, the new classes that are shared which we used to have to actually code all of them into a module and save the module, the fact that i can do application.path is absolutely stunning… maybe i am missing something
Public Function extractStr(source As String, start As String, ending As String)
Return source.Substring(InStr(source, start, CompareMethod.Text) + start.Length – 1, InStr(source, ending) – (InStr(source, start, CompareMethod.Text) + start.Length))
End Function
and me calling that function in a button …
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Dim tickr As String = extractStr(TxtScrape.Text, lblPreTickData1.Text, lblPreTickData2.Text)
Dim LastSearchEnd As Integer = 0
On Error Resume Next
‘Dim tickrperc As Decimal = extractStr(TxtScrape.Text, lblPreTickData1.Text, lblPreTickData2.Text)
TickerPRE.Text = tickr
MsgBox(“found ” & TickerPRE.Text)
End Sub
i am new to streamreader…. many things have changed for i have not coded in 20 years… it keeps returning the same string rather then going to the next starting point or ending up in a different point…
i am sure it is probably as simple as changing the starting point to the ending point?
hopefully someone can help