|
-
Jul 21st, 2001, 09:16 AM
#1
Thread Starter
Addicted Member
Random numbers.
Hello.
Is it possible to get a random number between a given range?, lets say, to get x number, between 1 and 15.
Thanks in advance.
-
Jul 21st, 2001, 09:31 AM
#2
Yes.
Dim MY_OUT as Integer
Dim MY_LOW as Integer
Dim MY_HIGH as Integer
MY_LOW = 1
MY_HIGH = 15
Randomize
MY_OUT = Int(Rnd * (MY_HIGH - MY_LOW + 1) )+ MY_LOW
MsgBox MY_OUT
-Hope this helps
-Lou
Last edited by NotLKH; Jul 21st, 2001 at 09:37 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|