Powered by: Dharamveer Saxena

Monday, November 2, 2009

TestComplete : To generate random number between two numbers


'To get random number

'Randomize is used as a seed to Rnd so that it will generate a random number each time.
' A simple formula is used to generate a random number between two number: Int((max-min+1)*Rnd+min)


Function makeRandom(min, max)
Randomize
makeRandom = Int((max-min+1)*Rnd+min)
End function

No comments:

Post a Comment