isnoend2001
asked on
count numbers selected by randomize
Working on a keno game. have added a Autoplay with an option to stop Auto play after user defined # of times with a max of 2000.if user selects 2000 the the game will randomize 80 numbers with 20 selections for each randomize and update the results with each run. Some one asked me to add a feature to display the most popular number of the 80 being hit.
What could i use to keep track of how many times each number is selected and display the results. Preferably sorted by the highest hit number at the top?
Example:
number 1, hit 25 times
number 2, hit 35 times
number 3, hit 55 times
etc,etc
all the way to number 80
What could i use to keep track of how many times each number is selected and display the results. Preferably sorted by the highest hit number at the top?
Example:
number 1, hit 25 times
number 2, hit 35 times
number 3, hit 55 times
etc,etc
all the way to number 80
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
could you show me how to write this:
Dim mNumberCount(1 To 80) As Long 'form declaration
mNumberCount(i) = DrawnNumber (i)
mNumberCount(i) = mNumberCount(i) + 1
DrawnNumber (i) is the number selected
Dim mNumberCount(1 To 80) As Long 'form declaration
mNumberCount(i) = DrawnNumber (i)
mNumberCount(i) = mNumberCount(i) + 1
DrawnNumber (i) is the number selected
It would be something more like
Dim number As Long
Dim mNumberCount(1 To 80) As Long 'form declaration
number = DrawnNumber (i)
mNumberCount(number) = mNumberCount(number) + 1
Dim number As Long
Dim mNumberCount(1 To 80) As Long 'form declaration
number = DrawnNumber (i)
mNumberCount(number) = mNumberCount(number) + 1
ASKER
Thanks
ASKER