VBA code for Pivot Table Filters into new tabs

ziegleen

New Member
Joined
May 29, 2015
Messages
1
Hello Everyone,

I have wrote VBA code for a pivot table that includes a filter for 10 shops I am dealing with. Is there a way to put each shops data into a new tab within the same workbook from the Pivot. So there will now be 10 new tabs with all of the respective shops data.

Any help is much appreciated.

Thanks!
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
It is actually very quick to do this without VBA. Just follow PivotTable Tools --> Analyze --> PivotTable --> Options --> Show Report Filter Pages.

The VBA behind it is very simple as well:
Code:
ActiveSheet.PivotTables("PivotTable1").ShowPages PageField:="MyReportFilter"
 
Upvote 0
I am getting error while assign this VBA.

Error :-
"Run-time error '1004':
Unable to get the PivotTables property of the worksheet class
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,822
Members
449,096
Latest member
Erald

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