hello is any one can give me solution, how to protect sheet immediate enter the value.pls help


  1. abhi

    pls use this code to protect sheet cell.

    Private` Sub Worksheet_Change(ByVal Target As Range)
    Dim cel As Range
    ActiveSheet.Unprotect ‘ Password:=”secret”
    For Each cel In Target
    If cel.Value “” Then
    cel.Locked = True
    End If
    Next cel
    ActiveSheet.Protect ‘ Password:=”secret”
    End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *