When you do this:

Code:
locationTwo = Asc(textInput.Substring(i + 1, 1))
On the last character, you are going to be out of bounds, as you are saying take the last character and look at the next one.

For what you are doing, you can probably change your loop to:

Code:
For i = 0 To ((textInput.Length) - 2)