Hangman. I always thought you guessed letters and not words. Have they come up with a new way of playing the game?
I would say that you need to set up a string array that matches the word that you are guessing.
And then I would create a string array for the correct word.
Dim strArrayWord(11) as string
Dim strArrayGuessed(11) as string
Every Time a correct letter (letter not word--little bit of a difference) is guessed, you fill the strArrayGuessed(x) with the proper value.
So, if the word is BassettHound and the user chose 's,' then
strArrayGuessed(2) = "s": strArrayGuessed(3) = "s"
Your next step would be to check each array to see that each member matches. You could use a for loop:
dim bCorrect as Boolean
bCorrect = True
for i = 0 to 11
if strArrayGuessed(i) = strArrayWord(i) then
else
bCorrect = False
exit for
End if
next i
if bCorrect = True then
' Success
else
' Failure
End if
The Boolean variable bCorrect will not be left as True unless all letters of the word are correct. That's a start.