Check out the VBA help for the Activate Event and the Example.
"Brian" <Brian@discussions.microsoft.com> wrote in message
news:4A3C3DD8-2E04-444F-AFDA-D5C53E1CEC29@microsoft.com...
> What code do I need to write, if I would like an advanced filter to run
> everytime I click on a particular worksheet.
>
> So if I go to worksheet A and change something then the next time I go to
> worksheet b the advanced filter will have automatically run for me?
>
> I am able to get this far.
>
> Range("C8:AH233").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=
_
> Range("BA3:BA4"), Unique:=False
Bookmarks