Pivot Table - Trigger event on drill down

G

Guest

Is it possible to trigger an event on vba when a user drills down (or back)
in a pivot table. Is there anything like: ?

sub PivotTable.OnDrillDown

End Sub

Thanks
 
T

Tom Ogilvy

You can use the workbook newsheet event in xl97 and later. Just check each
new sheet and determine if it appears to be produced from a pivot table
drilldown. I am not familiar with a drill back.
 
G

Guest

Hi Martyn,

So far as I know, there are know pivot table events. The worksheet
calculate event fires when the pivot table changes as a result of a drill up
or down. Depending on your purpose that might make a good substitue.

Regards,
Mike
 
G

Guest

Thanks for that, "Worksheet_Calculate" worked just how id hoped. My drill
down/up is the type where the pivot table expands rather that generates a new
sheet, so the calculate solution is the best to use for now. Thanks also to
Tom as the new sheet event will probably come in handy sooner or later.

:)

Martyn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top