S sdsurzh Member Feb 21, 2013 #1 Hi, I want a code if the active sheet as filter then it should msg "Filter available" otherwise it should apply filter. Thanks, Suresh Kumar S
Hi, I want a code if the active sheet as filter then it should msg "Filter available" otherwise it should apply filter. Thanks, Suresh Kumar S
Luke M Excel Ninja Staff member Feb 21, 2013 #2 In the ThisWorkbook module, paste this in [pre] Code: Private Sub Workbook_SheetActivate(ByVal Sh As Object) If Sh.AutoFilterMode Then MsgBox "Filter available" Else Sh.UsedRange.AutoFilter End If End Sub [/pre]
In the ThisWorkbook module, paste this in [pre] Code: Private Sub Workbook_SheetActivate(ByVal Sh As Object) If Sh.AutoFilterMode Then MsgBox "Filter available" Else Sh.UsedRange.AutoFilter End If End Sub [/pre]