View Single Post
  #2   Report Post  
Ian
 
Posts: n/a
Default

Right click on the sheet tab and select View Code, then paste the routine
below into the VBA window (where the falshing cursor is).

Change the sheet names and cell references to suit your requirements.

Private Sub Worksheet_Change(ByVal Target As Range)
Worksheets("Sheet1").Unprotect
If Range("A1") = 0 Then
Range("B1").Locked = True
Range("C2:C3").Locked = True
Else
Range("B1").Locked = False
Range("C2:C3").Locked = False
End If
Worksheets("Sheet1").Protect
End Sub


--
Ian
--
"Curtis" wrote in message
...
I am not an expert at excel, but I want to lock certain cells, once the
value
of a different cell that makes reference in a formula to these cells
reaches
0. Can this be done and can someone tell me how.