How do you get a random number in VB?

Status
Not open for further replies.
Rnd() returns a number between 0 and 1 --> sucks.

Code:
YourVar = CInt (Int((upperbound - lowerbound + 1) * Rnd() + lowerbound))

upperbound is the highest number you want to get. lowerbound is the lowest. Simple...
 
Last edited:
Status
Not open for further replies.
Back
Top