Consulting

Results 1 to 4 of 4

Thread: Run code after pivot table refreshes

  1. #1
    VBAX Newbie
    Joined
    Dec 2007
    Posts
    2
    Location

    Run code after pivot table refreshes

    Hi,

    Is there a way to capture a refresh or filter applied to a PivotTable as an event with which to attach code? PivotTable refreshes tend to remove formatting of column headers and was looking for a way to either set the formatting up so that I could keept it or have code re-apply the formatting.

    Hopefully one of the geniuses out there can help.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Why don't you add a button and refresh the pivot from within the macro assigned to that button. You can add whatever code you like then.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Newbie
    Joined
    Dec 2007
    Posts
    2
    Location
    Thanks for the reply.

    I can do that but was hoping for something a little more automated like and event handler for the filters. Any thoughts on that?

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    There is no pivot refresh event that you can hang on to.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •