Excel VisualBasic Script

Sub filter()
     If ActiveSheet.AutoFilterMode Then
        MsgBox "Turned on"
     End If
End Sub