I have a really frustrating problem. My VBA code works fine at work, but when I run the exact same code on my PC at home, I get the following error when I get to the red line of code: "Run-time error 1004: Unable to get the PivotItems property of the PivotField class".
The problem occurs in the code below, where the StartDate has been input via an InputBox as 10/1/2018 and the EndDate as 5/26/2019.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
At work I'm using Excel 2016 Standard, and at home I'm using Office 365 Home Excel Version 1809. I can get the red line of code to work at home if I change it to:
But then the error occurs on the next line, whether I use the original line or the modified line:
OR
This error confounds me, since my code is the same, only the computer and version of excel are different, and both the excel versions are quite current. I have attached 5 images in sequence to show the pivot table that I'm trying to filter. I can post more info if necessary, but I'm hoping there is a more holistic issue that someone can point out that may solve my problem. Any help that can be provided would be most appreciated! Thanks!
Bookmarks