Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2007

    Unanswered: 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

    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

  2. #2
    Join Date
    Oct 2003
    You will have to assign names to the Pivot tables and reference them accordingly.
    old, slow, and confused
    but at least I'm inconsistent!

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

    How to ask a question on forums

Posting Permissions

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