0

i'm trying to make a hangaroo game imitation but i dont know how to make the 4 labels to individually be marked as "X" when i click the wrong letter.
i made all the letter answer invisible and the "X" mark invisible

' the Answer is "PLANTS VS. ZOMBIES"
Private Sub cmdA_Click()
lbl3.Visible = True
End Sub

Private Sub cmdE_Click()
Label11.Visible = True
End Sub

Private Sub cmdI_Click()
Label13.Visible = True
End Sub

Private Sub cmdL_Click()
lbl2.Visible = True
End Sub

Private Sub cmdM_Click()
Label14.Visible = True
End Sub

Private Sub cmdN_Click()
lbl4.Visible = True
cmdn.enabled= false
End Sub

Private Sub cmdO_Click()
Label15.Visible = True
cmdO.enabled= false
End Sub

Private Sub cmdP_Click()
lbl1.Visible = True
cmdp.enabled= false
End Sub

Private Sub cmdS_Click()
lbl6.Visible = True
Label8.Visible = True
Label17.Visible = True
cmds.enabled= false
End Sub

Private Sub cmdT_Click()
lbl5.Visible = True
cmdt.enabled= false
End Sub

Private Sub cmdY_Click()
Label16.Visible = True
cmdY.enabled= false
End Sub

Private Sub Form_Load()
If Label1.Visible = True Then MsgBox "What?! Do you know How to Spell?!", vbOKOnly, "Wrong Answer!"
If Label2.Visible = True Then MsgBox " Again?! How little is Your Brain?!", vbOKOnly, "Wrong Answer!"
If Label3.Visible = True Then MsgBox " >.< !, Oh Common, this One so Easy", vbOKOnly, "Wrong Answer!"
If Label4.Visible = True Then MsgBox " That's It I'm Out of Here!", vbOKOnly, "Game Over"

End Sub

Now if i press "D" it must first show "X" on the first label cause its the first letter i wrongly pressed it first
The problem is what if i pressed it the second time or the 3rd or 4th??

the condition i made was

Private Sub cmdD_Click()
If Label1.Visible = False And Label2.Visible = False And Label3.Visible = False And Label4.Visible = False Then Label1.Visible = True
If Label1.Visible = True And Label2.Visible = False And Label3.Visible = False And Label4.Visible = False Then Label2.Visible = True
If Label2.Visible = True And Label1.Visible = True And Label3.Visible = False And Label4.Visible = False Then Label2.Visible = True
If Label2.Visible = True And Label1.Visible = True And Label3.Visible = False And Label4.Visible = False Then Label2.Visible = True

End Sub

please help me with this. ASAP. THANKS

1
Contributor
1
Reply
2
Views
6 Years
Discussion Span
Last Post by jasneg16
0

the result was all the "X" show even if i pressed only 1 wrong letter.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.