LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default autorefresh display autofilter criteria question

I came across a post earlier where the user asked how to
display the active criteria being used in an autofiltered-
list. They were directed to the following site.

http://j-walk.com/ss/excel/usertips/tip044.htm

I followed the instructions there. However, the displayed
criteria are only updated after I force a refresh (ctrl-
alt-F9). Is there a way to autoupdate without needing to
do it manually?

Thanks in advance

The code for the new module follows:

Function FilterCriteria(Rng As Range) As String
'By Stephen Bullen
Dim Filter As String
Filter = ""
On Error GoTo Finish
With Rng.Parent.AutoFilter
If Intersect(Rng, .Range) Is Nothing Then GoTo
Finish
With .Filters(Rng.Column - .Range.Column + 1)
If Not .On Then GoTo Finish
Filter = .Criteria1
Select Case .Operator
Case xlAnd
Filter = Filter & " AND " & .Criteria2
Case xlOr
Filter = Filter & " OR " & .Criteria2
End Select
End With
End With
Finish:
FilterCriteria = Filter
End Function



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Display Chosen Autofilter Value LP Excel Discussion (Misc queries) 2 April 28th 10 02:44 AM
Conflicts with autorefresh in pivot table activating sheet protect [email protected] Excel Discussion (Misc queries) 15 November 11th 08 05:39 PM
Set autorefresh for Shared Excel Workbook Sowjanya Sunkara Excel Discussion (Misc queries) 0 April 18th 07 06:36 PM
Autorefresh Fails on Open STEVE Excel Discussion (Misc queries) 0 December 20th 04 10:23 PM
VBA Autofilter Criteria Brandon[_5_] Excel Programming 1 November 7th 03 12:40 PM


All times are GMT +1. The time now is 04:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"