Hi anyone,

How could I make the following code to unlock blank cells in column G when a user types a value in cell J10 of the (protected) Active sheet.

[VBA]Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Rng
Dim MyCell
Set Rng = Range("G18:G53")
For Each MyCell In Rng
If MyCell.Value = "" Then

Else: ActiveSheet.Unprotect
MyCell.Locked = True
MyCell.FormulaHidden = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveSheet.EnableSelection = xlNoRestrictions
End If
Next
End Sub
[/VBA]

Any help on this would be kindly appreciated.

Thanks in advance.