• 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.

Pivot Tables in Macros

Steve Morris

New Member
I have created a pivot table within a recorded macro that gives an error when I try to run it. Is there a way for it to recognize the data source or keep it unique to avoid this error?

ActiveSheet.PivotTables("PivotTable1").PivotSelect "'1'", xlDataAndLabel + _
xlFirstRow, True

Do I need to create a range and name it for the pivot data?
 
The problem is probably the name of the Pivot table.
Post the whole recorded macro and we'll tweak.
 
Back
Top