I don't understand where I am doing something wrong. The instructions is to create a random application that generates a random number in the range of 1 through 100. If it's too low state "too low, try again" and the same for if it's too high.

(I'm using visual basic)

So I declared my variables and wrote a code for the procedure. I declared x as my integer. Any advice on how to correct it?
Thanks for all help

intNum = rand.Next(100) + 1
For x > intNum
MsgBox("Too high, try again")
For x < intNum
MsgBox("Too low, try again")
For x = intNum
MsgBox("You guessed right!")