title: How to stop message box repeating because of array?
body: <p>I'm trying to make a hangman game and to input "incorrect" if the user picks the wrong letter but it will keep repeating because of the <code>randomWord</code> which chooses the word from an array how do I stop this?</p>
  
  <pre><code>Sub wordGeneration()
      Dim wordUsed As Array = {"pizza", "noodle", "zombie", "object", "rowin", "running", "elephant", "lion"}
      Dim random As New Random
  
      randomWord = wordUsed(random.Next(0, 8))
      Label2.Text = randomWord
  End Sub
  
  Sub letterInput()
      For i As Integer = 0 To randomWord.Length - 1
          If userInput = randomWord(i) Then
              MessageBox.Show("correct")
          ElseIf userInput &lt;&gt; randomWord(i) Then
              MessageBox.Show("incorrect")
              Label4.Text = counter
          End If
      Next
  End Sub
  </code></pre>