Hi guys,
need a little help on this one.
I have a userform its for a login page (Username and password) i have a few if and if not on it, but when i run the code it still gives me a message box (Wrong username) but only on the second user (Gordon) Im sure its something small.
need a little help on this one.
I have a userform its for a login page (Username and password) i have a few if and if not on it, but when i run the code it still gives me a message box (Wrong username) but only on the second user (Gordon) Im sure its something small.
Code:
If TextBox1 = "Gordon" And TextBox2 = "123" Then
Sheet1.Activate
Ufdairy.Show
End If
Unload UserForm2
If TextBox1 = "Collin" And TextBox2 = "1234" Then
Sheet1.Activate
Ufdairy.Show
End If
Unload UserForm2
If Not TextBox1 = ("Collin") Or TextBox1 = ("Gordon") Then
MsgBox ("Wrong User Name")
Exit Sub
End If
If Not TextBox2 = "1234" Or TextBox2 = "123" Then
MsgBox ("Wrong Password, Please Try Again")
Exit Sub
End If
End Sub