Random.LessThan
From Xojo Documentation
Method
Returns a random number as an Integer in the range greater than or equal to 0 and less than Range (value >= 0 And value < Range).
Sample Code
This example generates a random integer from 0 to 99:
Label1.Text = Str(System.Random.LessThan(100))