niailmar
New member
- Joined
- Apr 4, 2012
- Messages
- 30
- Reaction score
- 0
- Points
- 0
Hello,
I need an expert to solve my problem.
I have login userform, which when user key in wrong password (3 times in a rows), a message will appear and close login userform.
Here the code of enter button:
I attach an interface of login form for your references.
I appreciate your help on this.
Thanks a lot. http://www.excelforum.com/attachment.php?attachmentid=169054&d=1342692981
I need an expert to solve my problem.
I have login userform, which when user key in wrong password (3 times in a rows), a message will appear and close login userform.
Here the code of enter button:
Code:
[/COLOR][LEFT][COLOR=#333333]Private Sub EnterPassword_Click()[/COLOR][/LEFT]
Dim password As StringDim x As Integerpassword = PasswordInput.TextIf password = WorksheetFunction.VLookup(UserList.Value, Range("Users_List"), 2, 0) ThenMsgBox "Password Accepted"Unload MeWorksheets("PCList").Visible = xlSheetVisibleSheets("PCList").SelectWorksheets("Main Page").Visible = xlSheetVeryHiddenActiveSheet.Range("$A$9:$K$1048576").AutoFilter Field:=11Worksheets("Blank").Visible = xlSheetVeryHiddenElse For x = 1 To 3If x < 3 ThenMsgBox "Unsuccessfull!"Next x ElseIf x = 3 ThenMsgBox "Sorry, 3 strikes you're out.", 16, "Cannot continue; incorrect password not given."End IfExit SubEnd If [LEFT][COLOR=#333333]End Sub[/COLOR][/LEFT][COLOR=#333333]
I attach an interface of login form for your references.
I appreciate your help on this.
Thanks a lot. http://www.excelforum.com/attachment.php?attachmentid=169054&d=1342692981