G
Guest
I am using the following function to highlight the column header of an
activated filter.
The problem is, when someone is already far down the list when they activate
the filter, the sheet doesn’t scroll up and reveal the whole list. I tried
to incorporate an Application.GoTo routine with this, but apparently
Functions won’t allow this. Is there another way of getting around this?
Thanks,
Steve
Function FilterVal(FilterNo As Integer) As String
Dim ws As Worksheet
Set ws = Application.Caller.Parent
Application.Volatile
If ws.AutoFilter.Filters(FilterNo).On Then
FilterVal = Mid(ws.AutoFilter.Filters(FilterNo).Criteria1, 2)
Else
FilterVal = ""
End If
End Function
activated filter.
The problem is, when someone is already far down the list when they activate
the filter, the sheet doesn’t scroll up and reveal the whole list. I tried
to incorporate an Application.GoTo routine with this, but apparently
Functions won’t allow this. Is there another way of getting around this?
Thanks,
Steve
Function FilterVal(FilterNo As Integer) As String
Dim ws As Worksheet
Set ws = Application.Caller.Parent
Application.Volatile
If ws.AutoFilter.Filters(FilterNo).On Then
FilterVal = Mid(ws.AutoFilter.Filters(FilterNo).Criteria1, 2)
Else
FilterVal = ""
End If
End Function