Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to execute some code whenever a filtering event has occurred
(selecting a value from the filter drop-down list). There are many events that can occur on a worksheet (calculate, change, etc.) but none of them kick off for a filter selection. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use the calculate event, but you need a formula that is dependent on the results of the
filter. Name a cell FormCell, and put a formula like: =SUBTOTAL(9,B1:B100) into it. Then name another cell ValueCell, and use code like this: you can replace the msgbox with your code. Private Sub Worksheet_Calculate() If Range("FormCell").Value < Range("ValueCell").Value Then MsgBox "Filtered" Application.EnableEvents = False Range("ValueCell").Value = Range("FormCell").Value Application.EnableEvents = True End If End Sub HTH, Bernie MS Excel MVP "mrwaller" wrote in message ... I want to execute some code whenever a filtering event has occurred (selecting a value from the filter drop-down list). There are many events that can occur on a worksheet (calculate, change, etc.) but none of them kick off for a filter selection. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Capture the hyperlink event before it goes to the link | Excel Discussion (Misc queries) | |||
Capture Update Links event VBA | Excel Programming | |||
How to Capture Edit Cell Event? | Excel Programming | |||
Capture scrolling event | Excel Programming | |||
capture paste event into a cell | Excel Programming |