Tr199
14-02-2004, 00:46
i just started to learn visual basic at college in my programming class and i was asked by a freind to make a screen that resembled a keypad and you have to type in a correct code to show the next form.
i have got the input workign but where i have used an IF statement it wants me to put in an END IF in some but i dont know where.
this is the code:
Private Sub Command2_Click()
If Text1 = "143121" Then End If
Form2.Show
End Sub
labelling is a bit rubbish but im just testing it out at the moment.
does anyone know where i have to put the end if statement to get it to work?
cheers
adam
(P.S. i tried asking my teacher but hes a right old miserable git and he wont tell me coz its not relavent to the work we are doing at the moment)
i have got the input workign but where i have used an IF statement it wants me to put in an END IF in some but i dont know where.
this is the code:
Private Sub Command2_Click()
If Text1 = "143121" Then End If
Form2.Show
End Sub
labelling is a bit rubbish but im just testing it out at the moment.
does anyone know where i have to put the end if statement to get it to work?
cheers
adam
(P.S. i tried asking my teacher but hes a right old miserable git and he wont tell me coz its not relavent to the work we are doing at the moment)