Hi i have a username and password textbox and i want to know when i enter a correct username the textbox it is in turns green and when wrong it will turn red, here is the code i have so far im not very experienced but know bits and pieces.
Code for txtpassword.text
If Sheets("Admin Sheet").Range("B3") = tryPassword Then
txtPassword.BackColor = vbGreen
Else: txtPassword.BackColor = vbRed
End If
End Sub
Code for txtusername.text
If Sheets("Admin Sheet").Range("A2") = tryUserName Then
txtUsername.BackColor = vbGreen
Else: txtPassword.BackColor = vbRed
End If
End Sub
any help would be brill thanks.
Bookmarks