HOW TO COMPARE NUMBERS IN VB, PLEASE HELP
Hi i am trying to make a lottery program , i got the program to show 7 numbers 1-49 and als made sure that the are not the same, but can someone give me the code for the checking the number the user has input. for expamle if user inputs 1,25,45,49,41,47 , i need the code for the program to check if it the same as the ones genrated , if the user get 3 number i message comes up saying you won £10 , if 5 number come up then message comes saying you won £2000.
I aslo need the genarated number to stored somewere so that , you can check the number from pervoius genrated numbers for up 5weeks.
i am soory i am new to this so can someone please help.
here is the code i got so far.
Private Sub cmdChoose_Click()
Dim arrNumber(1 To 6) As Integer ' Array
Dim intLucky As Integer ' Random Number
Dim intCount As Integer ' Selection Counter
Dim intCheck As Integer ' Previous Selection Counter
For intCount = 1 To 6 ' Select Six Numbers
Start: ' Start Point
Randomize (Timer) ' Seed Randomiser
intLucky = Int((49 * Rnd) + 1) ' Random number 1 to 49
For intCheck = 1 To 6
If intLucky = arrNumber(intCheck) Then
GoTo Start 'If selected number already present, select again
End If
Next intCheck
arrNumber(intCount) = intLucky ' Store selected number in array
lblNumber(intCount - 1) = arrNumber(intCount) ' apply selection to labels
Next intCount
End Sub
Private Sub cmdQuit_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim i As Integer
For i = 0 To 5
|