- Aug 19, 2009
I need to generate random numbers from 1 to 25 and store them in an array so that I can then pull test questions from a bank, based on the order of the numbers in the array. I'm using this code to generate my random number.
How do I store each number generated in an array, after checking the array to see if it has already been added? The array must have no repeated numbers in it, and must include all the numbers from 1 to 25 in a random order (i.e. 24, 7, 2, 19, 13, 1, 4, ...... )
randomvalue = CInt(Int((25 - 1 + 1) * Rnd() + 1))