Pivot Table issue...works fine in 2003 but not in 2010

Myriad_Rocker

Board Regular
Joined
Dec 1, 2004
Messages
67
I've built a report that has a Summary page and a Detail page. The data set is a report by Retailer and has various other things on it. It has drop downs at the top where you can select various things and be able to whittle down the results. As you select things, the pivot tables updates accordingly.

All is well in 2003 on the Detail page. But when doing the same things (selecting a Retailer from a dropdown), the pivot moves up an entire row. This causes my pane freezing to freeze at the wrong spot. Not only that but it turns my first cell black. I don't get that at all.

Here's some pics...

2003 - Initial load up - Everything is just fine.
9f8f6d53ee3435df460f6554fa6429e2bb83607f8e2fb51e04b313864600b7b96g.jpg


2003 - After Selection - Again, everything is just fine.
91fcabb47665cca22f482dad7a8c9f98008dc19e2a00e0acb43bb0cf3c63a9856g.jpg


2010 - Initial load up - Everything is just fine.
9ec4433b1da00fbe8b85fe9d32338af4f6747867cd1822b81c3737dfc90bc38b6g.jpg


2010 - After Selection - It goes nasty
e434ae2c2e5bcb15f11ed4be6332926c479d1055155707a947960186a79ce9356g.jpg



So...I do get that SOMETHING is happening when the pivot is refreshed...but what, I do not know. Because I'm filtering on Retailer and displaying it, I have it twice in my data source. Here's some code...

Code:
Private Sub combo_Retailer_Change()
    If Application.EnableEvents = False Then Exit Sub Else

    Dim MyRange As Range
    Dim pt As PivotTable
    Dim ws As Worksheet
    Dim pt2 As PivotTable
    Dim ws2 As Worksheet
    Dim pi As PivotItem
    Dim pi2 As PivotItem
    
    Set ws = Sheets("Zone Voids Report Summary")
    Set MyRange = Worksheets("Monthly VOID KPI Report").Range("ActiveItems_Retailer")
    Set pt = ws.PivotTables("Pvt_Summary")
    Set ws2 = Sheets("Zone Voids Report Detail")
    Set pt2 = ws2.PivotTables("Pvt_Detail")
    
    Application.EnableEvents = False
    Application.ScreenUpdating = False
    
    With pt.PivotFields("Retailer")
        If ActiveSheet.combo_Retailer.Value = "(All)" Then
            .CurrentPage = "(All)"
        Else
            For Each pi In .PivotItems
                If pi.Value = ActiveSheet.combo_Retailer.Value Then
                    .CurrentPage = pi.Value
                End If
            Next
        End If
    End With
    
    Sheets("Monthly VOID KPI Report").Select
    Sheets("Monthly VOID KPI Report").Calculate
    Sheets("Zone Voids Report Detail").Select
    
    With pt2.PivotFields("Retailer Filter")
        If ActiveSheet.combo_Retailer.Value = "(All)" Then
            .CurrentPage = "(All)"
        Else
            For Each pi2 In .PivotItems
                If pi2.Value = ActiveSheet.combo_Retailer.Value Then
                    .CurrentPage = pi2.Value
                End If
            Next
        End If
    End With
    
    Application.EnableEvents = True
    Sheets("Zone Voids Report Summary").combo_Retailer.Value = Sheets("Zone Voids Report Detail").combo_Retailer.Value
    
    'Sheets("Zone Voids Report Summary").combo_BottlerSystem.List = GetUniques(MyRange)
    'Sheets("Zone Voids Report Detail").combo_BottlerSystem.List = GetUniques(MyRange)

    FormatPainterforGapfromDetail
    
    Application.ScreenUpdating = True
End Sub
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,224,616
Messages
6,179,909
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top