|Public Class Form1|
Dim num As Integer
Private Sub GetNumber()
num = Math.Ceiling(Rnd() * 20)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Private Sub Guess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Guess.Click
Select Case (Val(Guess.Text))
Case Is > num
Msg.Text = Guess.Text & " is too high"
Case Is < num
Msg.Text = Guess.Text & " is too low"
Case Is = num
Msg.Text = Guess.Text & " is correct" & _
"I have thought of another number - Try again!"
Guess.Text = ""
I'm creating a guessing program/game that you enter a number into a textbox, and you have to go along with it until the program says that you are either high, or low, depending on what number you choose.
My design looks like the above. My label is named "Msg," and my button is named "Guess."
The program is simply not working and I can't figure out why, whenever I input a number into my textbox it always says "Guess is too low."