Here's a full function:Originally posted by DaoK
rnd random a number between 0 and 1 so if you want to have a random number between 7 and 10 you will need to do :
rnd * 3 + 7
That a little tip![]()
VB Code:
Public Function RandInt(lowerbound As Integer, upperbound As Integer) RandInt = Int((upperbound - lowerbound + 1) * Rnd + lowerbound End Function




Reply With Quote