Hi Guys....
I recorded a pivot table to run reports. However, I get an error.
See attached
Hi Guys....
I recorded a pivot table to run reports. However, I get an error.
See attached
Last edited by nawGo; 04-15-2014 at 11:14 AM.
Hi,
The easiest way to make it flexible is to use a dynamic range name which automatically adjusts to your data range and use the name as the PT source range. Then with the PT sheet activate event just write a line of code to refresh the PT cache.
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star iconbelow the post.
Thanks Richard.
Last edited by nawGo; 04-14-2014 at 12:07 PM.
So basically the table is constant except for column D .
I recorded the macro to create a pivot table (I recorded using dynamic range and it didn't work).
My requirement is that sometimes I have to delete the Insider information completely from the this tab but I would still like the macro to run and not give me a run time error:
![]()
ActiveSheet.PivotTables("PivotTable1").PivotFields("Information Type"). _ CurrentPage = "(All)" With ActiveSheet.PivotTables("PivotTable1").PivotFields("Information Type") .PivotItems("Insider").Visible = False .PivotItems("(blank)").Visible = False End With ActiveSheet.PivotTables("PivotTable1").PivotFields("Information Type"). _ EnableMultiplePageItems = True
How do I make this macro flexible? so that it can even run when I delete the insider rows?
Attached is a sample
Last edited by nawGo; 04-15-2014 at 11:15 AM.
Okay.. I found the solution here:
http://www.contextures.com/xlPivot04.html#Clear2002
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks