Rnd function
Summary
Pseudo-random number.
Syntax
Returns a Single containing a pseudo-random number.
Example
Example
This example uses the Rnd function to generate a random integer value from 1 to 6.
Dim MyValue As Integer
MyValue = Int((6 * Rnd) + 1) ' Generate random value between 1 and 6.
This example uses the Rnd function to generate a random integer value from 1 to 6.
Dim MyValue As Integer
MyValue = Int((6 * Rnd) + 1) ' Generate random value between 1 and 6.