There seems to be no documentation on how to generate random numbers as easily as in VB6. The following generates a different sequence of number(s) in the range 0 to 45 each time it is invoked, even if the project is re-started (which is where several generators fall down).
VB Code:
Dim rnd As New Random (Form or Global scope NOT local) TextBox1.Text = rnd.Next(45).ToString




Reply With Quote