Random Long Number Generator

mjenkinson05

Member
Joined
Mar 8, 2007
Messages
13
Programming Experience
Beginner
Hay Guys,
Im wanting to add a form into my application which generates a 10digit long random number and display it to a text box. The displaying it to a text box i can do, but i dont know how to generate random numbers of a certain length.
Can anyone help?
 
Dim myRnd As New Random
Dim MyNumber As Long = myRnd.Next("1000000000", "10000000000")

TextBox1.Text = MyNumber.ToString("N")

that should work, I don't have the IDE here to test it though
 
Back
Top