• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

change colour of spreadsheet tabs when autofilter is on

terry

New Member
I have a long spreadsheet and want to change the colour of the autofilter tabs to another colour, such as red, when they are on. I use the spreadsheet for project management.


Does anyone have any ideas?


Regards


Terry
 

Hui

Excel Ninja
Staff member
in the VBA editor paste the following into the ThisWorkbook code page


Private Sub Workbook_SheetCalculate(ByVal Sh As Object)


If ActiveSheet.AutoFilterMode = True And ActiveSheet.FilterMode = True Then

ActiveSheet.Tab.ColorIndex = 3 ' Change the value to suit yourself

Else

ActiveSheet.Tab.ColorIndex = xlColorIndexNone

End If


End Sub
 
Top