Non capisco come mai ti si è presentato l'errore che hai riportato...
Io ho creato una form, vi ho inserito qualche pulsante ( 4 per l'esattezza) e una textbox, quindi ho aggiunto il codice che ti ho scritto e mi funziona tutto molto bene.
questo è il codice completo:
codice:
Public Class Form1
Dim ParolaSegreta As String = "Topolino"
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
For i As Int16 = 0 To CShort(ParolaSegreta.Length - 1)
TextBox1.Text += "-"
Next
End Sub
Private Sub checkLettera(ByVal lettera As Char)
Dim stringa As String = TextBox1.Text
For i As Int16 = 0 To CShort(ParolaSegreta.Length - 1)
If Char.ToLower(ParolaSegreta(i)) = lettera Then
stringa = stringa.Insert(i, lettera).Remove(i + 1, 1)
TextBox1.Text = stringa
End If
Next
End Sub
Private Sub Button_A_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_A.Click
checkLettera("a")
End Sub
Private Sub Button_L_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_L.Click
checkLettera("l")
End Sub
Private Sub Button_O_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_O.Click
checkLettera("o")
End Sub
Private Sub Button_T_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_T.Click
checkLettera("t")
End Sub
End Class
Ovviamente è solo un esmpio per mostrarti come avrei risolto il problema che hai postato; devi adattartlo alle tue esigenze.
Spero ti possa tornare utile.
Ciao