VBA Pivot Table Run Time Error 5 Invalid Procedure Call for Office 365

erin00

New Member
Joined
Jul 14, 2015
Messages
14
I have this macro with the lines below (this is also the highlighted part when error is encountered) that previously works on win7 - ms office '10 and '13. But in win10 office 365, it errors out with the message invalid procedure call - runtime error 5. I've found some online like changing the pivot version but none work so far.

VBA Code:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
        "Sheet1!R1C1:R17C26", Version:=xlPivotTableVersion14).CreatePivotTable _
        TableDestination:="Sheet2!R1C1", TableName:="PivotTable4", DefaultVersion _
        :=xlPivotTableVersion14
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Maybe...
VBA Code:
ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
        "Sheet1!R1C1:R17C26", Version:=xlPivotTableVersion15).CreatePivotTable _
        TableDestination:="Sheet2!R1C1", TableName:="PivotTable4", DefaultVersion _
        :=xlPivotTableVersion15
 
Upvote 0
Thank you for replying. I tried your suggestion and change it to xlPivotTableVersion15 but Im still getting the error.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

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