Randomize Statement |
No
Randomize [number]
number
Use: Optional
Data Type: Variant
Any valid numeric expression.
Initializes the random number generator.
Randomize uses number as a new seed value to initialize the random number generator used by the Rnd function. The seed value is an initial value that generates a sequence of pseudo-random numbers.
If you don't pass number to the Randomize statement, the value of the system timer is used as the new seed value.
Repeatedly passing the same number to Randomize doesn't cause Rnd to repeat the same sequence of random numbers.
If you need to repeat a sequence of random numbers, you should call the Rnd function with a negative number as an argument immediately prior to using Randomize with any numeric argument.