Thank you. Using the code below, if I enter the numbers 12345678 and click the Last 6 button, I get 3456
txtStockNum.Text = txtVIN.Text.SubString2(txtVIN.Text.Length-6,6)
But if I click on the last 8 button I get 12345678 using this code
txtStockNum.Text = txtVIN.Text.SubString2(txtVIN.Text.Length-8,8)
But if I enter 12345678901234567 I get an error when clicking the Last 6 button stating
Stringindexoutofboundsexception:
length = 17; regionStart = 11; regionlength = 5
And if I click on the last 8 button I get this error.
Stringindexoutofboundsexception:
length = 17; regionStart = 9; regionlength = 1