A
Anthony
For Some reason, i get the same value everytime...
Ive tested the RND Function with msgboxes and labels, they all have no
influence on the RND Function...
It still doesnt work...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim count As Integer
Dim rndNumber(5) As Integer
Dim userNumbers(5) As Integer
Dim storage As Integer
Do While count < 5
storage = Val(InputBox("Enter a lottery number:",
"LOTTERY!", ""))
userNumbers(count) = storage
rndNumber(count) = Rnd()
count += 1
Select Case count
Case 1
lbl1.Text = storage
Case 2
lbl2.Text = storage
Case 3
lbl3.Text = storage
Case 4
lbl4.Text = storage
Case 5
lbl5.Text = storage
End Select
Loop
Dim lowernumber As Single = 100000
Dim uppernumber As Single = 1000000
Dim uppernumber2 As Single = 9
Dim lowernumber2 As Single = 1
lblRndLoot.Text = "$" & Int(lowernumber + rndNumber(5) *
(uppernumber - lowernumber)) & " Dollars!"
lblFirstValue.Text = 1 + Int(rndNumber(1) * 10)
lblSecondValue.Text = 1 + Int(rndNumber(2) * 10)
lblThirdValue.Text = 1 + Int(rndNumber(3) * 10)
lblFourthValue.Text = 1 + Int(rndNumber(4) * 10)
lblFifthValue.Text = 1 + Int(rndNumber(5) * 10)
End Sub
Ive tested the RND Function with msgboxes and labels, they all have no
influence on the RND Function...
It still doesnt work...
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim count As Integer
Dim rndNumber(5) As Integer
Dim userNumbers(5) As Integer
Dim storage As Integer
Do While count < 5
storage = Val(InputBox("Enter a lottery number:",
"LOTTERY!", ""))
userNumbers(count) = storage
rndNumber(count) = Rnd()
count += 1
Select Case count
Case 1
lbl1.Text = storage
Case 2
lbl2.Text = storage
Case 3
lbl3.Text = storage
Case 4
lbl4.Text = storage
Case 5
lbl5.Text = storage
End Select
Loop
Dim lowernumber As Single = 100000
Dim uppernumber As Single = 1000000
Dim uppernumber2 As Single = 9
Dim lowernumber2 As Single = 1
lblRndLoot.Text = "$" & Int(lowernumber + rndNumber(5) *
(uppernumber - lowernumber)) & " Dollars!"
lblFirstValue.Text = 1 + Int(rndNumber(1) * 10)
lblSecondValue.Text = 1 + Int(rndNumber(2) * 10)
lblThirdValue.Text = 1 + Int(rndNumber(3) * 10)
lblFourthValue.Text = 1 + Int(rndNumber(4) * 10)
lblFifthValue.Text = 1 + Int(rndNumber(5) * 10)
End Sub