Syntax
Public Sub Randomize(Optional Number As Double)
Description
This sub procedure is used toinitially seed the random number generator. Then, to generate a random number, you must use the MathRnd function.
Parameters
Key | Description |
Number | The new seed value.An optional value of type double. |
Return value
No returned value.
Sample
Public Sub main()' Initialize the random number generator.Randomize AlertMessage MathRnd()*6+1 ' The result will be a random value of type double between 1 and 6 End Sub
See Also