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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
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,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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