Paste this macro into the Sheet Level module:
Code:
Option Explicit
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Value <> "" Then
changeInput = MsgBox("Do you want to unlock the sheet?", vbYesNo + vbQuestion, "Unlock sheet")
If changeInput = vbYes Then
Dim pass As String
pass = InputBox("Enter Password")
If pass <> "password" Then
MsgBox ("Wrong password")
Else
ActiveSheet.Unprotect Password:="password"
Target.Locked = False
End If
End If
End If
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cel As Range
ActiveSheet.Unprotect Password:="password"
For Each cel In Target
If cel.Value <> "" Then
cel.Locked = True
End If
Next cel
ActiveSheet.Protect Password:="password"
End Sub