I've been doing some digging and have found a few answers but nothing that does specifically what I'm trying to do. I have an excel file with over 10 sheets and four of these sheets I need to apply a filter to based on a selection made on another sheet. I'm currently using the code below, but I have to select each sheet in order for the filtering to work.
Private Sub Worksheet_Activate()
Unprotect Password:="notouch"
On Error Resume Next
Selection.AutoFilter Field:=2, Criteria1:=Sheets("Choose Your Department").Range("D3").Value
Protect Password:="notouch"
End Sub
I'm looking for a way to get the filtering to work so the users don't have to select each tab to make it happen. The filtered results are then being used on other tabs the users will be editing. Any help would be appreciated.
Thanks.
Private Sub Worksheet_Activate()
Unprotect Password:="notouch"
On Error Resume Next
Selection.AutoFilter Field:=2, Criteria1:=Sheets("Choose Your Department").Range("D3").Value
Protect Password:="notouch"
End Sub
I'm looking for a way to get the filtering to work so the users don't have to select each tab to make it happen. The filtered results are then being used on other tabs the users will be editing. Any help would be appreciated.
Thanks.