Copy and paste the following code in your sheet VBA code section:
-----
[pre]
Code:
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address <> "$A$1" Then Exit Sub
With ActiveSheet
.Unprotect
.Range("B1").Locked = (Range("A1").Value = True)
.Protect
End With
End Sub
[/pre]
-----
Remember to protect the worksheet in order to work properly first time. Adjust protection and unprotection statements if password is required.