Ignoring End Statement
I got help here to use the Workbook sheet change event to protect some
worksheets. But the code first tests to see which sheet in the workbook
the user is changing, and allows it on some, prevents it on others. But
the End statement I put into the case doesn't execute, it's just being
ignored. Any ideas on what's going on here?
Private Sub Workbook_SheetChange(ByVal ws As Object, ByVal Target As
Range)
For Each ws In ActiveWorkbook.Worksheets
If Right(ws.Name, 7) < "Monthly" Then 'ignore these sheeets
Select Case ws.Name
Case "TOTALS", "CONTACT SUMMARY", "CONTACT SUMMARY by type",
"(Code Key)" 'Excluded sheets
End <----IGNORED
Case Else 'if password hasn't been entered yet, then ask
for password
If bPwrdEntrd = False Then
' Call EnterPassword(ws)
Call PasswordEntry
End If
End Select
End If
Next
End Sub
Thanks again!
|