View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default protecting and unprotecting

Glad to help

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Fusion1337" wrote in message
...
Thanks, that worked nicely

Private Sub Worksheet_Change(ByVal target As Range)
If Intersect(target, Range("a1")) Is Nothing Then Exit Sub
'MsgBox "HI"
If target 10 Then
ActiveSheet.Unprotect Password:="pw"
Range("b1").Locked = False
ActiveSheet.Protect Password:="pw"
Else
ActiveSheet.Unprotect Password:="pw"
Range("b1").Locked = True
ActiveSheet.Protect Password:="pw"
End If
End Sub