If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Event Procedure - PivotTableUpdate

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-29-08, 05:44
akhlaq768 akhlaq768 is offline
Registered User
 
Join Date: Oct 2007
Posts: 127
Event Procedure - PivotTableUpdate

I have created a macro that allows me to add the formatting back to a Pivot Chart, because every time a Pivot Chart is amended it looses its formatting.

Then I’ve copied the Macro code into the Worksheet PivotTableUpdate…. Which means every time the Pivot Chart is changed it runs the macro code, which adds the label… that’s great and it works perfectly…

The code is added to the sheet that stores the pivot table…. Unfortunately I have a numerous pivot tables in a single sheet, therefore the formatting will apply to every single pivot table in that sheet… I don’t want that to happen…

I just want selected pivot tables in the single sheet to run the code…

How can I do this?

Thanks in advance

Code:
Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
    ActiveChart.SeriesCollection(1).ApplyDataLabels AutoText:=True, LegendKey:= _
        False, ShowSeriesName:=False, ShowCategoryName:=False, ShowValue:=True, _
        ShowPercentage:=False, ShowBubbleSize:=False
End Sub
Reply With Quote
  #2 (permalink)  
Old 01-30-08, 21:37
shades shades is offline
Registered User
 
Join Date: Oct 2003
Posts: 1,091
You will have to assign names to the Pivot tables and reference them accordingly.
__________________
old, slow, and confused
but at least I'm inconsistent!

Rich
(retired Excel 2003 user, 3/28/2008)

How to ask a question on forums
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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