i have a vb5 game in the works and i need help with it. it needs a random number genorator because the player must later guess the number. there is a problom i can't solve. the number is never actually returned. please help. this is the code i have for this function:
Private Sub Command1_Click()
If Option1.Value = True Then
Randomize
thenumb = Int((15 * Rnd) + 1)
End If
If Option2.Value = True Then
Randomize
thenumb = Int((30 * Rnd) + 1)
End If
If Option3.Value = True Then
Randomize
thenumb = Int((50 * Rnd) + 1)
End If
If Option1.Value = False Then
If Option2.Value = False Then
If Option3.Value = False Then
Randomize
thenumb = Int((1000000 * Rnd) + 1)
End If
End If
End If
Form1.Visible = False
Form2.Visible = True
End Sub