A common asked question is how to produce a random number.

Well here is .NET way


Dim rnd As New System.Random()

rnd.Next(10)


rnd.Next will return a value up to 10. If you dont want max value, just remove the 10 and it will randomly choose a postitve number anywhere in the Long Data Type range.