Put two text boxes in user form (textbox 1 and textbox2).
Add 2 buttons: one for Log in, another for Cancel
Set the password textbox PaswordChar property to some characters (i.e. *) which will mask the user's password.
The Log in name is stored in Sheet1 column A and the password in Column B.
Hide Sheet1 so that user will not be able to see this.
Private Sub CommandButton1_Click()
If TextBox1 = "" Then GoTo LogErr
Set LogName = Sheet1.Range("A1:a65536").Find(TextBox1)
If Not LogName Is Nothing Then
If Sheet1.Range("A1:a65536").Find(TextBox1).Offset(0, 1) = TextBox2 Then
MsgBox "Welcome " & TextBox1
MsgBox "Log in error" & Chr(13), vbCritical, "Log in Failed"
Private Sub CommandButton2_Click()
old, slow, and confused
but at least I'm inconsistent!