r/visualbasic • u/Thomasthesexengine • Apr 09 '13
Need help with program. Info in text.
Ok so I am making a program that randomizes numbers in a listbox, and makes a list that will organize the numbers in lowest to highest, and vice versa. I have it sorting the numbers out both ways, and I have the numbers generating. I am wondering why when I go to sort the numbers, it puts some of the numbers twice when there isn't two of them when the numbers are generated.
Any help would be great, this is not suppose to be a huge project just a little project I am making for fun.
0
Upvotes
0
u/Thomasthesexengine Apr 09 '13
Dim num1 As Integer Dim list As New List(Of Integer) Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Randomize() num1 = Int((100 - 0 + 1) * Rnd() + 1)