here's a handy little piece of code:
VB Code:
Public Function RandomNumber(Min as Double, Max as Double, Optional WholeNumber as Boolean = True) If WholeNumber = True then RandomNumber = Int(Rnd() * (Max - Min) + Min) Else RandomNumber = Rnd() * (Max - Min) + Min End If End Function




Reply With Quote