Posted by Mohammad Rahhal, Last modified by Salameh Abu Hashish on 07 December 2018 02:36 PM


Public Function MathRnd(Optional Number As Double) As Single

This function is used to produce random number less than 1 but greater than or equal to zero. 


Key Description 
Number An optional numeric value which determines how Rnd method generates a random numbe.

Return value

Value Return Result
Less than zero The same number every time , using number as the seed.
Greater than zero The next random number in the sequence.
Equal to zero The most recently generated number.
Not  supplied The next random number  in the sequence.


Public Sub main()

' Initialize the random number generator.


AlertMessage MathRnd()*6+1 

  ' The result will be a random value of type double between 1 and 6 

End Sub

See Also

Back to VTL Client Script Index

(0 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions