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

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
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,214,833
Messages
6,121,857
Members
449,051
Latest member
excelquestion515

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