Random number

''' ---
''' Random Number
''' ---

Function RandomNumber(nMin, nMax)

RandomNumber = vbNull

If Not IsNumeric(nMin) Then Exit Function

If Not IsNumeric(nMax) Then Exit Function

If nMin >= nMax Then Exit Function

Randomize

RandomNumber = Int((nMax - nMin + 1) * Rnd + nMin)

End Function

Page tags: library random
page_revision: 0, last_edited: 1217790092|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License