Hi
Below code is my record marco. However, when I run the code, I got the run-time erro '1004' with description "Unable to set the CurrentPage property of the PivotField class". Could you please help me to fix the code?
Sub sel_vert()
ActiveSheet.PivotTables("bml_gender").PivotFields("[bml_demos_vertical].[VERTICAL].[VERTICAL]").ClearAllFilters
ActiveSheet.PivotTables("bml_gender").PivotFields("[bml_demos_vertical].[Vertical].[Vertical]").CurrentPage = myVert
End Sub
I have Excel 2010; and the pivottable was created on a SSAS Cube.
Many Thanks!
Shumei
__._,_.___
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.
----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA
----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com
----------------------------------
.
__,_._,___
Tidak ada komentar:
Posting Komentar