Submitted by Brian Element on Tue, 08/28/2012 - 12:02
This is used to create a seed value for the Rnd() function, this helps vary the output of the random seed. You would place a number as the seed, one good option is to use the Second(Now()), this would make sure that your seed is different every time you run the script.
'Random number between 1 and 100 Sub Main Dim random_number As Double Randomize(Second(Now()) random_number = Rnd() * 99 MsgBox random_number MsgBox Int(1 + random_number ) End Sub
All material provided on the IDEAScripting website is presented as is without any warranty or guarantee. Anybody using any solution provided on this pages is encouraged to validate the effectiveness and reliability on their own.