Try adding this to the worksheet's code module...
Private Sub Worksheet_Change(ByVal Target As Range)
Dim sPassWord As String
Const PW As String = "aaa" 'Change to suit
If Target.Address = "$D$7" Then
If Target.Value = "Engineering" Then
sPassWord = Application.InputBox("Enter Password to unprotect worksheet.", "Worksheet Protected")
If sPassWord = PW Then
Me.Unprotect PW
Else
Range("$D$7").ClearContents
MsgBox "Incorrect password entered."
Me.Protect PW
End If
Else
Me.Protect PW
End If
End If
End Sub
Bookmarks