Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim user As String
- Dim password As String
- Dim user1 As String
- Dim password1 As String
- Static failed As Integer
- user = LCase(Me.txtUser.Text)
- password = LCase(Me.txtPassword.Text)
- user1 = "curtis"
- password1 = "gabor"
- If user = user1 And password = password1 Then
- MsgBox("login successful")
- Application.Exit()
- End If
- If user <> user1 And password = password1 Then
- MsgBox("user ID is Incorrect")
- Me.txtUser.Text = ""
- failed = failed + 1
- End If
- If user = user1 And password <> password1 Then
- MsgBox("password is Incorrect")
- Me.txtPassword.Text = ""
- failed = failed + 1
- End If
- If user <> user1 And password <> password1 Then
- MsgBox("Incorrect login and password")
- Me.txtUser.Text = ""
- Me.txtPassword.Text = ""
- failed = failed + 1
- End If
- If failed = 3 Then
- MsgBox("Sorry, access denied!")
- Application.Exit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement