![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 13
|
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 |
|
Board Regular
Join Date: Mar 2002
Location: Leiden, The Netherlands
Posts: 68
|
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 | |
|
New Member
Join Date: Mar 2002
Posts: 13
|
Quote:
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 |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|