Hi All,
I'm trying to use VBA to set the criteria on specific columns (s) to select all. There are number of columns that will have the criteria manually set that I do not want to modify.
When I use the below code it will remove all the criteria but it will not set it to "select All" leave all the selections uncheck completely.
Any help would be greatly appreciated thanks for reviewing.
I'm trying to use VBA to set the criteria on specific columns (s) to select all. There are number of columns that will have the criteria manually set that I do not want to modify.
When I use the below code it will remove all the criteria but it will not set it to "select All" leave all the selections uncheck completely.
Any help would be greatly appreciated thanks for reviewing.
Code:
Sub Reset_filters3()
ActiveSheet.Unprotect
ActiveSheet.Range("A4").AutoFilter Field:=1, Criteria1:="(Selectall)"
ActiveSheet.Range("B4").AutoFilter Field:=1, Criteria1:="(Selectall)"
ActiveSheet.Range("E4").AutoFilter Field:=1, Criteria1:="(Selectall)"
'ActiveSheet.Range("A4").AutoFilter Field:=1, Criteria1:="Selectall"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True, AllowUsingPivotTables:=True
End Sub