• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Error 1004 when modifying pivot table from macro

farrusete

Member
Hi,


I'm just modifying a pivot table field from a dropdown list and all of my pivot tables work except one (Pivot_Devices) and they have just the same code:


With Worksheets("Dashboard").Shapes("months_unique").ControlFormat

Worksheets("Dashboard").Range("C2") = .List(.Value)

Worksheets("Dashboard_Inputs").PivotTables("Pivot_Summary").PivotFields("Month").CurrentPage = Worksheets("Dashboard").Range("C2").Value

Worksheets("Dashboard_Inputs").PivotTables("Pivot_Devices").PivotFields("Month").CurrentPage = Worksheets("Dashboard").Range("C2").Value

Worksheets("Dashboard_Inputs").PivotTables("Pivot_UU").PivotFields("Month").CurrentPage = Worksheets("Dashboard").Range("C2").Value

End With


Can you think about any clue that i could be missing?


Note: Both C2 and month field are "Text" fields and not dates.


Thank you in advance
 
Well i finally found It... just a typo on data sheet. By the way, I am now in troubles almost with the same in a public function (based on chandoo's tutorial for using tabs / http://chandoo.org/wp/2011/07/20/interactive-dashboard-using-hyperlinks/). I want to change a pivot table field onmouseover and Im trying to do it this way:


Public Function highlightSeries(seriesName As Range)

If Range("valSelSite") = seriesName.Value Then

Exit Function

Else

Range("valSelSite") = seriesName.Value

Worksheets("Dashboard_Inputs").PivotTables("Pivot_Sites").PivotFields("Site").CurrentPage = Range("valSelSite")

End If

End Function


But it does nothing and pivot table remains with the same data.


Again, thank you so much in advance for your help.
 
also tried with


Worksheets("Dashboard_Inputs").PivotTables("Pivot_Sites").PivotFields("Site").CurrentPage = seriesName.Value


with no luck
 
Back
Top