I have written this code for a guessing game but it doesn't clear the message box to allow for a new guess.
Any suggestions would be appreciated.
Dim intIndex As Integer
Dim intGuess As Integer
Dim intIndexCount As Integer
intIndexCount = 1
intGuess = txtGuess
Do While intGuess <> intIndex
intIndex = Rnd * 12
If intGuess < intIndex Then
MsgBox "I am sorry your guess is too low", vbRetry, "Too Low"
intGuessCount = intGuessCount + 1
txtGuess.Text = ""
ElseIf intGuess > intIndex Then
MsgBox "I am sorry your guess is too low", vbRetry, "Too Low"
intGuessCount = intGuessCount + 1
ElseIf intGuess = intIndex Then
MsgBox "Your right", vbRetry, "WoW"
intGuessCount = intGuessCount + 1
End If
Loop
Thanks for any help you can offer
Any suggestions would be appreciated.
Dim intIndex As Integer
Dim intGuess As Integer
Dim intIndexCount As Integer
intIndexCount = 1
intGuess = txtGuess
Do While intGuess <> intIndex
intIndex = Rnd * 12
If intGuess < intIndex Then
MsgBox "I am sorry your guess is too low", vbRetry, "Too Low"
intGuessCount = intGuessCount + 1
txtGuess.Text = ""
ElseIf intGuess > intIndex Then
MsgBox "I am sorry your guess is too low", vbRetry, "Too Low"
intGuessCount = intGuessCount + 1
ElseIf intGuess = intIndex Then
MsgBox "Your right", vbRetry, "WoW"
intGuessCount = intGuessCount + 1
End If
Loop
Thanks for any help you can offer