I am finding this issue \"Run-time error \'5\' Invalid procedure call or argument\" when defining the PivotCache on my code. The Excel I am using is 2016 MSO (16.0.4266.1001) 32
Just in case anyone is encountering a similar problem and the above answer does not solve, if you are using Slicers which are connected to various pivots (all of which come from the same data source) then the ChangePivotCache will not work unless you disconnect the pivots from the slicer first. A few days of searching through questions/answers and finally came across the problem!