sassriverrat
Well-known Member
- Joined
- Oct 4, 2018
- Messages
- 655
Good Morning,
I have the following code that's been working well as a "password box" to unlock a few sheets. However, I'd like to tweak it so that the if the password is wrong, it will display an "wrong password" message and then ask for the password again. this is all mounted on userform5 as commandbutton3.
Thanks for the help!
I have the following code that's been working well as a "password box" to unlock a few sheets. However, I'd like to tweak it so that the if the password is wrong, it will display an "wrong password" message and then ask for the password again. this is all mounted on userform5 as commandbutton3.
Thanks for the help!
Code:
Private Sub CommandButton3_Click()
On Error GoTo Helper
Pass = Application.InputBox("Enter Password", "The Coding Sheets")
If Pass = CStr(Worksheets("Developer").Range("B23").Value) Then
Sheets("Developer").Visible = True
Sheets("Notes").Visible = True
Sheets("Ports").Visible = True
Sheets("Developer").Select
Application.Visible = True
End If
Unload Me
'Error Clearing Code
End Sub