This example uses the Rnd function to generate a random integer value from 1 to 6.
Dim MyValue MyValue = Int((6 * Rnd) + 1) ' Generate random value between 1 and 6.