Hi All
I am trying to protect a cells value once it has been input
The code I am using works. However, it stop the user from using the auto filter function
This is the code
Private Sub Worksheet_Change(ByVal Target As Range)
Dim xRg As RangeOn Error Resume NextSet xRg = Intersect(Range("A1:F8"), Target)
If xRg Is Nothing Then Exit Sub
Target.Worksheet.Unprotect Password:="123"
xRg.Locked = True
Target.Worksheet.Protect Password:="123"
End Sub
Can anyone help me to protect the cell and still use the auto filter
Thanks in advance
I am trying to protect a cells value once it has been input
The code I am using works. However, it stop the user from using the auto filter function
This is the code
Private Sub Worksheet_Change(ByVal Target As Range)
Dim xRg As RangeOn Error Resume NextSet xRg = Intersect(Range("A1:F8"), Target)
If xRg Is Nothing Then Exit Sub
Target.Worksheet.Unprotect Password:="123"
xRg.Locked = True
Target.Worksheet.Protect Password:="123"
End Sub
Can anyone help me to protect the cell and still use the auto filter
Thanks in advance
