Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not good with Math
#11
I read this somewhere:

Quote:By the way, as of VB6 anyway, 'Randomize Timer' is redundant, as that is the default behavior of 'Randomize'.

And this is a good random function:

Code:
Function Random(Lowerbound As Integer, Upperbound As Integer) As Integer
    Random = Int((Upperbound - Lowerbound + 1) * Rnd) + Lowerbound
End Function

For example Random(0, 10) will produce numbers from 0-10.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)