View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] austris.bahanovskis@gmail.com is offline
external usenet poster
 
Posts: 6
Default How can run a macro ( call a macro) on selection of any filtercriteria?

I don't know if there is a trappable worksheet/application event that
would trap filter change or maybe it is possible to create an object
that would raise an event in case FilterChanges.
You can have a look at brilliant site that (among other things) deals
with Application Events:
http://www.cpearson.com/Excel/AppEvent.aspx

If not possible, then I'd try to do it 'from the other side' - instead
of trying to raise event by changing filter I'd try to figure out a
way to change the filter by code - and then running the code that you
intended in the first place isn't a problem. All you'd need to do is
to limit users changing the filter manually and force them to use the
code to apply the filter (it might be easily achievable by protecting
the ws and letting only the code to apply the filter).
Hope it's somewhat helpful.