ChiTownDiva
Technical User
The answer is probably in my face and I just can't see it, but here goes:
Private Sub Workbook_Open()
Application.WindowState = xlMaximized
Worksheets("Shamika Bailey".Visible = False
Worksheets("Michael Brown".Visible = False
Worksheets("LaJuanda Hall".Visible = False
Worksheets("Jean Hedden".Visible = False
Worksheets("Adria Lundy".Visible = False
Worksheets("Yasu Talodin".Visible = False
Worksheets("Melissa Thompson".Visible = False
Worksheets("Lovita Whitfield".Visible = False
Dim GetPassword As String
Dim IncorrectResponse As Long
Dim Response As Long
Password: GetPassword = InputBox("Enter Password", "Password"
If GetPassword = "pktspfk" Then
Worksheets("Shamika Bailey".Visible = True
Worksheets("Michael Brown".Visible = False
Worksheets("LaJuanda Hall".Visible = False
Worksheets("Jean Hedden".Visible = False
Worksheets("Adria Lundy".Visible = False
Worksheets("Yasu Talodin".Visible = False
Worksheets("Melissa Thompson".Visible = False
Worksheets("Lovita Whitfield".Visible = False
Else
IncorrectResponse = MsgBox("Incorrect Password", vbRetryCancel + vbCritical)
End If
If Password = 2 Then
Workbooks("Book5.xls".Close SaveChanges:=False
End If
If IncorrectResponse = 4 Then
GoTo Password 'GetPassword
ElseIf IncorrectResponse = 2 Then
Workbooks("Book5.xls".Close SaveChanges:=False
End If
End Sub
Okay, here's the dilema...when I click the cancel button on the "Password" input box, the "Incorrect Password" message box pops up. This is good. When I click "Retry" on the message box, the "Password" input box comes back up. This is also good. When I enter a correct password, the sheet becomes visible, but the "Password" box won't go away. It keeps prompting for a password. This is not good. I know the answer is staring me in the face, but I can't see it.
Does anybody out there see it?
Thanks.
ChiTownDivaus
Private Sub Workbook_Open()
Application.WindowState = xlMaximized
Worksheets("Shamika Bailey".Visible = False
Worksheets("Michael Brown".Visible = False
Worksheets("LaJuanda Hall".Visible = False
Worksheets("Jean Hedden".Visible = False
Worksheets("Adria Lundy".Visible = False
Worksheets("Yasu Talodin".Visible = False
Worksheets("Melissa Thompson".Visible = False
Worksheets("Lovita Whitfield".Visible = False
Dim GetPassword As String
Dim IncorrectResponse As Long
Dim Response As Long
Password: GetPassword = InputBox("Enter Password", "Password"
If GetPassword = "pktspfk" Then
Worksheets("Shamika Bailey".Visible = True
Worksheets("Michael Brown".Visible = False
Worksheets("LaJuanda Hall".Visible = False
Worksheets("Jean Hedden".Visible = False
Worksheets("Adria Lundy".Visible = False
Worksheets("Yasu Talodin".Visible = False
Worksheets("Melissa Thompson".Visible = False
Worksheets("Lovita Whitfield".Visible = False
Else
IncorrectResponse = MsgBox("Incorrect Password", vbRetryCancel + vbCritical)
End If
If Password = 2 Then
Workbooks("Book5.xls".Close SaveChanges:=False
End If
If IncorrectResponse = 4 Then
GoTo Password 'GetPassword
ElseIf IncorrectResponse = 2 Then
Workbooks("Book5.xls".Close SaveChanges:=False
End If
End Sub
Okay, here's the dilema...when I click the cancel button on the "Password" input box, the "Incorrect Password" message box pops up. This is good. When I click "Retry" on the message box, the "Password" input box comes back up. This is also good. When I enter a correct password, the sheet becomes visible, but the "Password" box won't go away. It keeps prompting for a password. This is not good. I know the answer is staring me in the face, but I can't see it.
Does anybody out there see it?
Thanks.
ChiTownDivaus