mmarkym
Member
- Joined
- Aug 20, 2005
- Messages
- 13
- Programming Experience
- 3-5
I've almost got it. As I enter a letter in one box the same letter in the other box is replaced with "".
The problem is the first letter won't do anything. If I have
1st box contains- a b c d e f g
As I type in the second box all letters will be removed(replaced) except the a, nothing happens as I type a.
Dim WordToCheck As String = txtEnterWord.Text
Dim StringToCheck As String = txtAlphabet.Text
Dim theLetter As String
If txtEnterWord.Text = "" Then
Exit Sub
Else
theLetter = WordToCheck.Substring(WordToCheck.Length - 1)
If StringToCheck.IndexOf(theLetter) Then
StringToCheck = StringToCheck.Replace(theLetter, "")
txtAlphabet.Text = StringToCheck
End If
End If
mark
The problem is the first letter won't do anything. If I have
1st box contains- a b c d e f g
As I type in the second box all letters will be removed(replaced) except the a, nothing happens as I type a.
Dim WordToCheck As String = txtEnterWord.Text
Dim StringToCheck As String = txtAlphabet.Text
Dim theLetter As String
If txtEnterWord.Text = "" Then
Exit Sub
Else
theLetter = WordToCheck.Substring(WordToCheck.Length - 1)
If StringToCheck.IndexOf(theLetter) Then
StringToCheck = StringToCheck.Replace(theLetter, "")
txtAlphabet.Text = StringToCheck
End If
End If
mark