I don't do alot of protection in Excel but this is what I believe. You are not going to the Tools, Protection, Protect Workbook menu are you. That only protects the workbook from having sheets added/removed or protects the size of the window. What I believe you are doing is going to the Tools, Protection, Protect Sheet for each sheet in the workbook, to protect formulas/values. If those assumptions are correct paste this code into the ThisWorkbook module and remove the previous code from the worksheet module. This code assumes you use the same Password for each Sheet which will be reset when the WorkBook is closed. Also while in the VBA explorer I would right click on
VBAProject(WorkbookName.xls), goto VBAProject Properties, click the Protection tab, then check the Lock project for viewing box and fill in the password boxes. This will keep an informed user from seeing the code and thus getting the password.
Const conSheetPW As String =
"SheetPassword"
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim shtSheet As Worksheet
For Each shtSheet In Me.Worksheets
shtSheet.Protect conSheetPW
Next shtSheet
End Sub
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Dim strPW As String
Dim strUser As String
If ActiveCell.Locked = True And ActiveSheet.ProtectContents = True Then
strUser = InputBox("What Is Your UserName?", "Enter Name"

If strUser =
"UserName1" Or strUser =
"UserName2" Then
If InputBox("What Is The Password?", "Enter Password"

=
"BoxPassword" Then
ActiveSheet.Unprotect (conSheetPW)
Else
MsgBox "Invalid Password", vbOKOnly
End If
Else
MsgBox "Invalid UserName", vbOKOnly
End If
End If
End Sub
I only added 2 usernames in the example but you just keep repeating (Or strUser = "UserName2"

for each username you want.