i have just started learning vb at college, my first assignment is make the game hangman. i have made the command buttons into control arrays with each caption a letter of the aphabet.

what i want the program to do is search the chosen word and check if the letter chosen(by command button) is in there.
i am using the mid function, but keep getting errors. my code is as follows

i will appreciate any help as i am still new to this.

Private Sub cmdLetter_Click(Index As Integer)
cmdLetter(Index).Enabled = False
guess = txtGuess.Text
Let guess = Chr(Index + 65)
For i = 0 To Len(answer)
If Mid(answer, i, 1) = guess Then
txtGuess.Text = guess

wrong = wrong + wrong = 1

Else
If wrong = 1 Then ln1.Visible = True
ElseIf wrong = 2 Then ln2.Visible = True

Else:
If wrong = 3 Then ln3.Visible = True
Else
If wrong = 4 Then ln4.Visible = True
Else
If wrong = 5 Then Sh1.Visible = True
Else
If wrong = 6 Then ln5.Visible = True
ElseIf wrong = 7 Then ln6.Visible = True
ElseIf wrong = 8 Then ln7.Visible = True
ElseIf wrong = 9 Then ln8.Visible = True
ElseIf wrong = 10 Then ln9.Visible = True

Next