Slicers disabled post macro/pivot creation

Pierre777

New Member
Joined
Jan 6, 2014
Messages
10
Hi.

I have written a fairly simple macro that formats some data, then creates a pivot table.
My problem is that the Slicer function is not enabled.
I have gone thru every post I can find on the issue and it's not the old compatibility mode issue - I am using 2010 & it is creating an xlsm file.
If I copy/paste the formatted dataset into a new workbook & create a new pivot table, setting it up manually, the slicer function works - albeit that the format for the pivot table comes out differently. I have tried to use VBA to create a new workbook and copy/paste the pivot table in - the slicer still wont enable.

What (obvious) thing am I missing?

Any help appreciated.

Cheers

Pierre
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
37,192
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
I suspect your code is setting the wrong version for the pivotcache and/or pivot table. Can you post the code?
 

Forum statistics

Threads
1,137,298
Messages
5,680,689
Members
419,927
Latest member
Axtros

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
Top