Dim rannum As Random
Dim number As Integer
rannum = New Random
number = rannum.Next(1, 1001)
TextBox1.Text = number.ToString
The 1 is the lowest number it will generate.
The 1001 is the highest number it will generate.
Change
TextBox1.Text into the control you want the number to show.
It could be a label or button.
No comments:
Post a Comment