Though of course you could use a worksheet event macro?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim af As AutoFilter
Dim fFilter As Filter
Dim iFilterCount As Integer
If ActiveSheet.AutoFilterMode Then
Set af = ActiveSheet.AutoFilter
iFilterCount = 1
For Each fFilter In af.Filters
If fFilter.On Then
af.Range.Cells(1, iFilterCount).Interior.ColorIndex =
6
Else
af.Range.Cells(1, iFilterCount).Interior.ColorIndex =
xlNone
End If
iFilterCount = iFilterCount + 1
Next fFilter
Else
Rows(1).EntireRow.Interior.ColorIndex = xlNone
End If
End Sub
--
roundabout
------------------------------------------------------------------------
Posted via
http://www.mcse.ms
------------------------------------------------------------------------
View this thread:
http://www.mcse.ms/message1745970.html