Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Linking Or Copying Filter Arrow

I have a created a spreasheet with autofilters in a worksheet name
"List", and created macros on a main menu worksheet named "Search".
am wanting to either link or copy the dropdown arrows in the filte
mode within the "List" worksheet, on to the "Search" worksheet, lisitn
the selection criteria.

Is this possible

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Linking Or Copying Filter Arrow

the autofilter object has a filters collection which can be queried to get
the filter criteria.

each filter also has an ON attribute which if true indicates it is being
applied.

Here is some code for getting information from the second column in the
Autofilter: (as an example)

Sub ShowCriteria()
Dim Afil As AutoFilter
Set Afil = ActiveSheet.AutoFilter
Dim sOp As String, op As Long
Dim sStr1 As String, sStr2 As String
On Error Resume Next
sStr1 = Afil.Filters(2).Criteria1
op = Afil.Filters(2).Operator
sStr2 = Afil.Filters(2).Criteria2
Select Case op
Case xlAnd: sOp = "And"
Case xlBottom10Items: sOp = "Bottom 10"
Case xlBottom10Percent: sOp = "Bottom 10%"
Case xlOr: sOp = "Or"
Case xlTop10Items: sOp = "Top 10"
Case xlTop10Percent: sOp = "Top 10%"
Case Else: sOp = "Nothing"
End Select
On Error GoTo 0
Debug.Print sStr1 & " " & sOp & "" & sStr2
End Sub

--
Regards,
Tom Ogilvy


"TONYC " wrote in message
...
I have a created a spreasheet with autofilters in a worksheet named
"List", and created macros on a main menu worksheet named "Search". I
am wanting to either link or copy the dropdown arrows in the filter
mode within the "List" worksheet, on to the "Search" worksheet, lisitng
the selection criteria.

Is this possible?


---
Message posted from http://www.ExcelForum.com/



Reply
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
Second small arrow on filter button EllenOJD Excel Discussion (Misc queries) 2 April 4th 23 11:38 AM
Excel data filter arrow Chris Excel Discussion (Misc queries) 2 April 23rd 08 11:35 PM
changing filter arrow colors Tonka_Joe_Kiwi Excel Discussion (Misc queries) 0 November 19th 05 04:25 AM
auto filter arrow won't go away GolfGal Excel Discussion (Misc queries) 1 April 13th 05 01:20 PM
Copying & Pasting arrow help Biff Excel Discussion (Misc queries) 0 December 31st 04 03:18 AM


All times are GMT +1. The time now is 09:50 AM.

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"