Solved the problem allready!!! This is the new code:
Private Sub Admin_button_click()
Dim Pword As String
On Error Resume Next
Pword = Application.InputBox(prompt:="Please enter Password", Title:="Password", Type:=2)
If Not Pword = "admin" Then
MsgBox "The Password you entered was incorrect"
Exit Sub
Else
MsgBox "Your Password was correct"
End If
Application.ScreenUpdating = False
If Admin_Button.Value = True Then
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
This puts me on another dilemma. Is there any way to show the password as dots in the inputbox?
Bookmarks