Hi
You will need to load the the alphabet in an array
Dim letters(25) As String
letters(0) = "A"
letters(1) = "B"
letters(2) = "C"
letters(3) = "D"
letters(4) = "E"
etc.
Then You will need to grab the Text box's contents.
Dim letterGrab As String
letterGrab = tbLetter.Text
Now get the letter's index
Dim found As Boolean = False
Dim FoundIndex As Integer = 0
For i As Integer = 0 To 25
If letters(i) = letterGrab Then
found = True
FoundIndex = i
Exit For
End If
Next
Finally get the new Letter and put it in the text box
If found = True Then
FoundIndex = FoundIndex + 1
tbLetter.Text = letters(FoundIndex)
Else
End If
If you need case insensitive comparison, change code block 3 to this:
Dim found As Boolean = False
Dim FoundIndex As Integer = 0
For i As Integer = 0 To 25
Dim CaseDiff As Integer = String.Compare(letters(i), letterGrab, True)
If CaseDiff = 0 Then
found = True
FoundIndex = i
Exit For
End If
Next
Hope This Helps
Jacques