Pivot Table Events

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to catch an event when a pivot table field is changed. I have
the sneaking suspicion that I might have to raise an event using with events,
but I am not tooo sure. Any suggestions???
 
Change event??

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "abc"
End Sub
 
Change event does not fire on pivot table changes. I tried that. Calcualtion
fires, but that is a little too generic an event for my application. I found
an answer on the Microsoft site. You need Excel 2003 to catch events from
pivottables. As luck would have it I am being upgraded to 2003 next month, so
it will have to wait unitl then.

Oh well....

Ken Wright said:
Change event??

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "abc"
End Sub
 
LOL - apologies but I guess that's why it was working for me as I'm using
2003.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

Jim Thomlinson said:
Change event does not fire on pivot table changes. I tried that. Calcualtion
fires, but that is a little too generic an event for my application. I found
an answer on the Microsoft site. You need Excel 2003 to catch events from
pivottables. As luck would have it I am being upgraded to 2003 next month, so
it will have to wait unitl then.

Oh well....

Ken Wright said:
Change event??

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox "abc"
End Sub

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

--------------------------------------------------------------------------
--
It's easier to beg forgiveness than ask permission :-)
--------------------------------------------------------------------------
--
 
Hmmm - just tried it on XP and I get the message box fire up no matter what
i do to the pivot table. Remove or add an item from any of the dropdowns,
drag fields around, hide items in page fields - they all display the
message?
 
Are you using 2000? Worksheet level events fire finen when a Pivot table is
updated in 2002/3. If of course you are
talking about a Before event for a Pivot Table then that is a different
matter entirely
 

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

Back
Top