iShuffle + lShuffle

Generates a random number, integer or long

CodeFunctionName
What is this?

Public

Tested

Original Work
Function iShuffle(lMinValue As Long, lMaxValue As Long) As integer
Randomize ' Uses system timer to seed the Rnd function
iShuffle = int((lMaxValue +1 - lMinValue) * Rnd + lMinValue)
End Function

Function lShuffle(lMinValue As Long, lMaxValue As Long) As Long
Randomize 'Uses system timer to seed the Rnd function
lShuffle = (lMaxValue - lMinValue) * Rnd + lMinValue
End Function

lMinValue, lMaxValue

Views 4,455

Downloads 1,387

CodeID
DB ID

ANmarAmdeen
602
Revisions

v1.0

Sunday
May
13
2018