Hello,

Thanks for taking the time to read my post and attempt to tacke my challenge.

I would like to write a macro that unprotects my sheet, auto filter and protect again. I am new to VBA and I appreciate all the support. I tried with something like that

Sub ProtectWithAutoFilterAndSortCapabilities()
With Sheets("Contractor Project Information")
ActiveSheet.Unprotect Password:="salesforce", DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
ActiveSheet.Protect Password:="salesforce"
End Sub


That didn't seem to work, Do I need to add the range or the auto filter field?

Not sure how to fix it. THANKS