Hi,
I've got this project with 18 sheets. The first 15 sheets are visible to everyone. But the last 3 sheets are veryhidden. I want to create a togglebutton with a password protection, so if it's enabled it shows the last 3 sheets. End if it's disabled the sheets become veryhidden again. The show and hide part is pretty easy going. But protecting it with a password stresses my brain. Maybe someone has some input for me. Here's the code I got so far. Gr. Terriz
Private Sub Admin_button_click()
Dim Password As String
Answer = InputBox("Enter Password")
Password = "admin"
If Answer = Password Then
Application.ScreenUpdating = False
Admin_Button.Value = True
Sheets("Codes-Dashboard").Visible = xlSheetVisible
Sheets("User Database").Visible = xlSheetVisible
Sheets("To Do!").Visible = xlSheetVisible
Else
Admin_Button.Value = False
Sheets("Codes-Dashboard").Visible = xlSheetVeryHidden
Sheets("User Database").Visible = xlSheetVeryHidden
Sheets("To Do!").Visible = xlSheetVeryHidden
End If
Application.ScreenUpdating = True
End Sub
EDIT: I forgot to mention the problem
. The enabling part works, but disabling doesn't.
Bookmarks