|
-
Mar 17th, 2000, 10:11 PM
#1
Thread Starter
Frenzied Member
Sorry, I forgot the randomize code...can someone post it?
Thanks A Bunch
-
Mar 18th, 2000, 01:08 AM
#2
Member
Lottery
copy this code into the form_Load() event to generate random numbers.
------------------------------------------------------------
Private Sub Form_Load()
Dim nRandom() as Integer
Dim nLoopCounter as Integer
Dim nArraySize as Integer
Form1.Show
Randomize
nArraySize =Int(Rnd(1) * 10)
ReDim nRandom(nArraySize)
For nLoopCounter = 1 to nArraySize
nRandom(nLoopcounter) = Int(Rnd(1) *49)
Form1.Print "Lottery Number "& nLoopcounter & " = "&
--> nRandoms(nLoopCounter)
Next
End Sub
------------------------------------------------------------
DOes this help? just remember that the Rnd and the Randomize are the main radomizers (no API)
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
|