The code below works just fine selecting Sheet1 then Sheet2 back to Sheet1. The auto filter will always be on within Sheet1. If I change the cells to a table and then select Sheet2 and back to Sheet1 the auto filter is off. Selecting Sheet2 and then Sheet1 will turn it on.
I'm not sure if this behavior is normal for a table or a bug.
Code: Select all
Private Sub Worksheet_Activate() 'This is Sheet1
If Not ActiveSheet.AutoFilterMode Then
ActiveSheet.Range("A1").AutoFilter
End If
End Sub