|
-
Feb 1st, 2000, 08:52 AM
#1
Thread Starter
New Member
Hello,
I am making a program that involves a random number selection. When you Press a cmdButton, it would randomly select a number in between 0-9. Any suggestions on a short code?
------------------
- M e n S h e n
Canabatech Programmer
Homepage http://influx.virtualave.net
Email [email protected]
ICQ 17527422
-
Feb 1st, 2000, 08:59 AM
#2
Const nLowerBound = 0
Const nUpperBound = 9
Randomize
MsgBox Int((nUpperBound - nLowerBound + 1) * Rnd + nLowerBound)
------------------
Marty
COGITO EGGO SUM
I think; therefore I am a waffle.
-
Feb 1st, 2000, 01:05 PM
#3
Hyperactive Member
I would do it :
RandomNumber= CInt(rnd()*10)
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
|