Changing the color of the data auto filter buttons

J

Jane P

Presently the active buttons are blue against a grey background and not very
visible. How can I change the active blue to a brighter color?
 
H

Héctor Miguel

hi, Jane !
Presently the active buttons are blue against a grey background and not very visible.
How can I change the active blue to a brighter color?

AFAIK the color of autofilter dropdown buttons can not be customized (it is by design)
you could use macros (i.e. in the '_calclate' event for "that" worksheet)
(if you don't mind to loose the stack for the undo levels)

hth,
hector.

right-click the tab-name of our worksheet and choose "view code"...
-> copy/paste (or type) the following lines

Private Sub Worksheet_Calculate()
Dim cFilter As Integer
Application.ScreenUpdating = False
With Me
If Not .AutoFilterMode Then Exit Sub
With Range(.AutoFilter.Range.Address)
For cFilter = 1 To .Columns.Count
With .Cells(1, cFilter)
If .Parent.AutoFilter.Filters(cFilter).On Then
.Interior.ColorIndex = 6
.Font.ColorIndex = 3
Else
.Interior.ColorIndex = xlColorIndexNone
.Font.ColorIndex = xlColorIndexAutomatic
End If
End With
Next
End With
End With
End Sub

-> *IF* there are NO formulae in your worksheet, the '_calculate' event could not be triggered
(a simple =now() function could it be enough)
or, create a sub procedure (in a standard code module) and use the above code with in
-> change the reference to "the worksheet":
from: With Me
into: With ActiveSheet
you should run "the sub" whenever you need to update the colors
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top