T terry New Member Nov 3, 2009 #1 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
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 Nov 3, 2009 #2 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
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