Ok, so i have been given the assignment to make a guessing game. I have it all done and ready, the only problem is when I try to run it says this:

Dim MAX, MIN
MAX = 99
MIN = 0
Randomize
Number = (Int((MAX-MIN+1)*Rnd+MIN))
Do Until Answer = Number
Answer = InputBox("Guess A Number Between:" & vbNewLine & "0 And 100", "Guessing Game:")
If Answer = "" Then
Quit = MsgBox("Do You Wish To Quit?",vbYesNo,"Quit:")
If Quit = vbYes Then
WScript.Quit 0
End If
Else If Answer = Number Then
MsgBox("Congrats You Got It!")
Else
MsgBox("Nope, Try Again...")
End If
Loop
Got it; simple oops:
Else If Answer = Number Then
Should be:
ElseIf Answer = Number Then
Separating Else If is creating a new If block, throwing everything off.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With