Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Run macro when Pivot Table changes

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    To run a macro every time I select an option of a pivot table I used the event handler WS_change. Unfortunately this doesn't work for Pivot Tables so I used the WS_calculate but this option slow down the process and is producing other little problems in my worksheet.

    Is there any better method to run a macro after any Pivot table change?.

    thanks in advance for your reply

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Leiden, The Netherlands
    Posts
    68
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have been confronted with a similar problem. I don't know of another event, but it might help to know that after changing a field (selection) in a PT, the "active cell" is always inside the table. So at the beginning of the WS_Calculate event handler, you could check whether the active cell is within the PT and exit the handler immediately if this is not the case.

    Marc

  3. #3
    New Member
    Join Date
    Mar 2002
    Posts
    13
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-23 06:46, paelinck wrote:
    I have been confronted with a similar problem. I don't know of another event, but it might help to know that after changing a field (selection) in a PT, the "active cell" is always inside the table. So at the beginning of the WS_Calculate event handler, you could check whether the active cell is within the PT and exit the handler immediately if this is not the case.

    Marc
    Hello Mark, thanks for the tip,
    Actually, the Worksheet_Calculate event works fine except when cells with Indirect funtion are present in my Worksheet. In that case, any change in any other open worksheet or workbook (with no relation to the one containing the PT)run the macro of the handler, which is really strange. Any idea about the reason?


    regards
    Francisco







Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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