Hi Team,
I have the following VBA Code that auto sorts and works great! The only issue is it wont work once i protect the sheet. I have one column locked and when i protect the sheet i allow sort but it wont work once i protect the sheet
Is there anything i can add to the code that will work?
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("K:K")) Is Nothing Then
Range("K5").Sort Key1:=Range("K300"), _
Order1:=xlAscending, Header:=xlDisbursed, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
End Sub
I have the following VBA Code that auto sorts and works great! The only issue is it wont work once i protect the sheet. I have one column locked and when i protect the sheet i allow sort but it wont work once i protect the sheet
Is there anything i can add to the code that will work?
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
If Not Intersect(Target, Range("K:K")) Is Nothing Then
Range("K5").Sort Key1:=Range("K300"), _
Order1:=xlAscending, Header:=xlDisbursed, _
OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End If
End Sub