Hi All,
This is most likely a very basic question, but I'm struggling.
Using TextChanged event on a basicLabel I want to manipulate the returned data, (which is just a long number, 10 digits).
I want to get a substring as indicated below, but I cannot.
If I use Substring I get System.ArgumentOutOfRangeException
If I use Mid the label goes blank.
If I use a bogus string, (TestStr3 below), it works fine.
Code below, (I've ballooned it out with un-needed variables for clarity and fault finding). Any advice welcomed.
Cheers,
GT.
Private Sub Time_TK01_TextChanged(sender As Object, e As EventArgs) Handles Time_TK01.TextChanged
Dim TestStr1 As String = Time_TK01.Text.ToString()
Dim TestStr2 As String = "1234567890"
Dim TestStr3 As String
TestStr3 = TestStr1.Substring(2, 2)
'TestStr3 = Mid(TestStr1, 2, 2)
Time_TK01.Text = TestStr3
End Sub