HI,
checkout the following 2 solutions:
1:
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim RandomClass As New Random()
Dim RandomNumber As Integer
RandomNumber = RandomClass.Next()
MessageBox.Show(RandomNumber, "www.interloper.nl", MessageBoxButtons.OK, MessageBoxIcon.Information)
Dim RandomNumber2 As Integer
RandomNumber2 = RandomClass.Next(100, 200)
MessageBox.Show(RandomNumber2, "www.interloper.nl", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
End Class
2.
Public Function GetRandomNum
Dim myRandom as New Random
dim RandomNumber as Integer = myRandom.Next('first value, 'sencond value) 'both as integers
Return RandomNumber
End Function
Thanks