Hello Shrikant,
Thanks for your reply.
I did what you suggested but it has the same behavior.
Function AFTER_REFRESH(ByVal Target As Range)
Dim ca As Range
ActiveSheet.Unprotect "test"
If Target.Column = 7 Then
For Each ca In Target.Cells
If ca.Value = 1 And ca.Column = 7 Then
Range("a" & ca.Row & ":d" & ca.Row).Locked = True
AFTER_REFRESH = True
Else
Range("a" & ca.Row & ":d" & ca.Row).Locked = False
AFTER_REFRESH = True
End If
Next
End If
ActiveSheet.Protect "test"
End Function
Could you please let me know if I'm missing something or doing wrong?
Thanks a lot & Best Regards,
Zaire