hopefully I have put this in the correct place , and a warm welcome to all the experts here at W3schools!!!
being a newbie to visual basic, i have experimented in making a program which i called thunderball random generator.
and successfully created it and it works fine, but there is a minor problem, as occasionally it throws up 2 numbers the same in my text boxes i have.
my setup is a generate button, with 6 text boxes to show the generated numbers
the code i have which obviously must be correct is
Private Sub Button1_Click (ByVal sender As Object, BYVal e As EventArgs( Handles Button1.Click
Dim RandX As New Random
TextBox1.Text = RandX.Next(1, 40)
TextBox2.Text = RandX.Next(1, 40)
TextBox3.Text = RandX.Next(1, 40)
TextBox4.Text = RandX.Next(1, 40)
Textbox5.Text = RandX.Next(1, 40)
TextBox6.Text = RandX.Next(1, 14)
so i am hoping someone can put me right on any coding to add so that it does away with 2 numbers the same appearing .
thank you to any help or advice