Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Re-run subroutine when pivot page field is changed

Hello,

I currently have a subroutine that basically executes contiional formats on
a pivot table. I was wondering if there is a way that if a user changes the
page field that I can remove all of the formats and then re-run the routine
for the newly displayed data.

Thanks in advance for your assistance.
John
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default Re-run subroutine when pivot page field is changed

Hi Aerotjk

You can do this. In the module for the worksheet that contains the pivot
table, select Worksheet in the Object drop down, and you should see
PivotTableUpdate in the Procedure drop down. Selecting these will give you a
Sub like this (or you can simply write the code below, in the Worksheet
module):

Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)

End Sub

You can then write, or call, your routine in here. If there are multiple
Pivot Tables on that sheet then use the Target variable to make sure you have
the right one.

Hope this helps,

Sean.


"AEROTJK" wrote:

Hello,

I currently have a subroutine that basically executes contiional formats on
a pivot table. I was wondering if there is a way that if a user changes the
page field that I can remove all of the formats and then re-run the routine
for the newly displayed data.

Thanks in advance for your assistance.
John

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Multiple Range Pivot Table's field button's caption be changed Jac Excel Discussion (Misc queries) 1 June 10th 07 11:09 AM
Pivot Table Page Field Muralidhar M S Excel Programming 0 March 21st 07 03:20 PM
run macro every time page field change is changed paulbrown Excel Programming 0 July 27th 06 02:14 PM
second axis disappears on pivot chart when page field changed paulbrown Charts and Charting in Excel 1 March 27th 06 01:49 PM
Returning actual page field changed in pivottable Grant Excel Programming 0 September 27th 04 01:02 AM


All times are GMT +1. The time now is 11:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"