VB Code:
Private sub Command1_Click() Dim user2 as string Dim pass2 as string user2 = bob pass2 = hi If user.Text = user2 & pass.text = pass2 Then GoTo right Else GoTo wrong End If wrong: msgbox "Please enter the right username or password!" goto exit2 right: msgbox "You have entered the right username and password!" exit2: exit sub
when i try this code, no matter what i type in the two text fields, i always get the message "Please enter the right username and password!" even when I type in bob for username and hi for password.
please help




Reply With Quote