'********************************************************************

'*

'* Function RandomRange

'*

'*   Author: NetworkAdminKB.com

'*  Created: 2004-11-22

'* Modified: 2004-11-22

'*

'* Purpose: Returns a random number within the range specified.

'*

'*   Input: intLo = The Lowest Number in the Range.

'*          intHi = The Highest Number in the Range.

'*

'*  Output: Returns a random number within the range specified.

'*          Returns Empty if either intLo or intHi is not a Number.

'*

'********************************************************************

Function RandomRange(ByVal intLo, ByVal intHi)

  'Version 1.0 2004-11-22

  Randomize

  If IsNumeric(intLo) And IsNumeric(intHi) Then

    RandomRange = Int((intHi - intLo + 1) * Rnd + intLo)

  Else

    RandomRange = Empty

  End If 'IsNumeric(intLo) and IsNumeric(intHi)

End Function 'RandomRange

Article ID: 412, Created On: 9/25/2011, Modified: 9/25/2011