Alright...I've looked over this code a bit. And cant quite figure out why,
it wont work. But...all it is, is a simple little math program, it gives two
random numbers, then the user has to put in the answer...quite easy. It has
two buttons: "New Problem!" And "Check It!" And I hope you can figure out
what these are 'suppose' to do. However.. I caught a snag. If I type in the
correct answer, it will say "Correct Answer" but if I type in the wrong
answer...it says the same this. I think either my If...then...else statement
is messed up..or there is some other way the script needs to be to add two
variables. Please help me. Thanks in advance.
Here's what I got....
--------------------------------------
Public Message1
Public Message2
Public UserName
------------------------------------
Private Sub CommandButton1_Click()
Label1 = Int((20 * Rnd) + 1)
Label3 = Int((20 * Rnd) + 1)
Message1 = "Sorry " & UserName & ", Thats Incorrect. Please Try It Again!"
Message2 = "Good Job " & UserName & ", You Got It Right!"
End Sub
------------------------------------
Private Sub CommandButton2_Click()
If TextBox1 = Label3 + Label1 Then
MsgBox Message1
Else
MsgBox Message2
End If
End Sub
----------------------------------
Private Sub Label3_Click()
End Sub
---------------------------------------
Private Sub UserForm_Click()
End Sub
----------------------------------------
Private Sub UserForm_Initialize()
UserName = InputBox("Please Give Me Your Name:")
End Sub