| From: Dave Hildebrand | E-mail: disco@air.on.ca | 1 |
Date: Tuesday, April 10, 2001 at 03:49:11
Subject: a few questions
Comments:
im takeing VB in school right now and my text does not have the answeres to these questions:
1. to get a random number from 1-75, and not repeat numbers.(i can get random numbers)
2. to get said numbers to show on an control button array as underlined ( its a bingo board, number drawn is "stamped" and cannot be drawn again)
any ideas would be great..even links to sites that would have that info
| From: Martin Allen | E-mail: <No e-mail> | 2 |
Date: Wednesday, April 11, 2001 at 23:07:43
Subject: RE: a few questions
Comments:
I hope the following code will help you with your problem:
|
Dim i(15) As Integer 'Change 15 to something else if it is not right Sub Bingo() Private Sub Form_Click() |
The 'Bingo' procedure will generate the random numbers between 1 and 75 and will store them in the variable i(1) to i(15) (if there are 15 numbers on a Bingo board?). No two numbers will be the same. When the event to call the numbers happens, just pick a number between 1 and 15 and use it i (<here>).
This forum is no longer taking new messages or replies since 01 November 2002. The above material is for reference purposes only.
The new Visual Basic 6.0 forum can be found here.