blah = CInt(Int((7 * Rnd()) + 0))
Generates a random integer between 0 and 6.
How can I modify this to give me a random number with 2 decimal places, still between 0 and 6?
As suggested below, I'm now using this code, and it seems to work:
Dim prng As New Random
Private Function aRand() As Double
Return Math.Round(prng.Next(0, 601) / 100, 2)
End Function
currentApp.statements(Pick, 7) = aRand()
currentApp.statements(Pick, 8) = aRand()
Thanks for all the suggestions.