run macro from AutoFilter

ndendrinos

Well-known Member
Joined
Jan 17, 2003
Messages
1,694
If at all possible I need a way to call a macro when I run the AutoFilter.
(that is when I click the little arrow of the AutoFilter)
I've tried worksheet change AND selection change and it does not work.
Thank you
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,881
Hi

The autofilter doesn't fire any specific event. One solution is to keep track of the autofilter's criteria and use the Calculate event of the worksheet and to detect a change.
 

ndendrinos

Well-known Member
Joined
Jan 17, 2003
Messages
1,694
Solved from Contextures
[thread]file:///C:/Users/owner/Desktop/excelfiles.html[/thread]
Filters/Phone List for Selected names
 

ndendrinos

Well-known Member
Joined
Jan 17, 2003
Messages
1,694
must have been typing when you posted pgc01.
The goal was to call a macro when filtering and I found this file at Contextures that works. I will have to work on it to adapt it.
Thank you
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,881
That solution uses the Advanced Filter not the Autofilter.

Anyway, I'm glad if it solves your problem. With a solution from Debra you can't go wrong.

BTW the link you posted did not work. This is the link:

http://www.contextures.com/excelfiles.html

and the solution you mencioned: FL0005 - Phone List for Selected Name
 

Watch MrExcel Video

Forum statistics

Threads
1,122,564
Messages
5,596,875
Members
414,106
Latest member
Tigretto

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top