- Home
·
- String Manipulation
·
- A good function that returns a random number within a range. Will not give the same number back-to-
A good function that returns a random number within a range. Will not give the same number back-to-
A good function that returns a random number within a range. Will not give the same number back-to-back, easy to use.
API Declarations
Visit my site to get tools that will help you with your projects.
(http://LostEmpire.s5.com)
Rate A good function that returns a random number within a range. Will not give the same number back-to-
(2(2 Vote))
Public Function Rand(Start As Integer, End1 As Integer) As Integer
Static rndLastNum As Integer
Randomize
Retry:
Do
n = Round(Rnd * End1): DoEvents
Loop Until (n >= Start) And (n <= End1)
If (n = rndLastNum) Then GoTo Retry
rndLastNum = n
Rand = n
End Function
A good function that returns a random number within a range. Will not give the same number back-to- Comments
No comments yet — be the first to post one!
Post a Comment