Private Sub RandomIntegerWithinExpRangeTest() ' Test the results from the RandomIntegerWithinExpRange function. ' Function prints any errors within the Debug window. Const lngMaxTries = 1024000 Dim intMinRange As Integer Dim intMaxRange As Integer intMinRange = MinInteger intMaxRange = MaxInteger Dim lngTry As Long For lngTry = 1 To lngMaxTries Dim varResult As Variant varResult = RandomIntegerWithinExpRange(intMinRange, intMaxRange) If IsNull(varResult) Then Debug.Print "Error: Try #" & lngTry & ": Result is Null" ElseIf varResult < intMinRange Then Debug.Print "Error: Try #" & lngTry & ": " & varResult & " < " & intMinRange ElseIf varResult > intMaxRange Then Debug.Print "Error: Try #" & lngTry & ": " & varResult & " > " & intMaxRange End If If TrueEveryNSeconds(est.TestInterval) Then Exit For Next lngTry End Sub
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.