I am protecting a sheet and allowing sorting and auto filter. But when I try to sort it says the sheet is locked.
Is this code wrong?
ActiveSheet.Protect Password:="123", DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowSorting:=True, AllowFiltering:=True
Is this code wrong?
ActiveSheet.Protect Password:="123", DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowSorting:=True, AllowFiltering:=True