G
Guest
Hi,
JE McGimpsey was kind enough to share a variant of the following code with
me for password authentication;
Const sPASSWORD As String = "****"
Dim vResponse As Variant
Do
vResponse = Application.InputBox("Please enter the password")
If vResponse = False Then Exit Sub 'User Cancelled
If vResponse <> sPASSWORD Then MsgBox "Unfortunately this is not the
correct password"
Loop Until vResponse = sPASSWORD
This is great but does anybody know how to limit this to three "loops". I
only want to give the individual inputting the password three attempts before
the application quits.
Thanks as always
Andy
JE McGimpsey was kind enough to share a variant of the following code with
me for password authentication;
Const sPASSWORD As String = "****"
Dim vResponse As Variant
Do
vResponse = Application.InputBox("Please enter the password")
If vResponse = False Then Exit Sub 'User Cancelled
If vResponse <> sPASSWORD Then MsgBox "Unfortunately this is not the
correct password"
Loop Until vResponse = sPASSWORD
This is great but does anybody know how to limit this to three "loops". I
only want to give the individual inputting the password three attempts before
the application quits.
Thanks as always
Andy