Private Sub buildmotordescription() Dim firsthash As Integer = 0 Dim secondhash As Integer = 0 Dim startpos As Integer = 0 Dim cursor As Integer = 0 Dim prodnum As String Dim tempchar As String = "" prodnum = IntrolProductNumberTextBox.Text Do Until tempchar = "-" cursor = cursor + 1 tempchar = prodnum.Substring(startpos, cursor) startpos = startpos + 1 cursor = cursor + 1 Loop firsthash = startpos MessageBox.Show(firsthash.ToString) End Sub