Hi Team,
I am experiencing a weird error with my pivot table driven workbook.
I have a workbook that has about 10 or so pivot tables. I have vba code that keys off changes to a cell validation drop down field. In the drop-down field are employee names that change the filters on all the pivot tables to deliver some data.
All these pivottables are copies of the original so i believe they share the same data set in terms of memory.
There is an issue that creeps in occassionally. When i try to change the employee name at times it works fine, all the pivotable filters get updated with the new name and the data is shown as it should.
However, occassionally i get an error. The error i get at first is
Run-time error 1004; Unable to get the PivotFields property of the PivotTable class
This error is shown on this line below:
If I comment this line out and run it again, the next error is:
Run-time error 1004; Unable to get the Text property of the Range class
This error is shown on this line below:
I have also noticed that once these errors are thrown, i lose the cell highlight box and cursor. If i click on a cell, i see the contents in the formula bar, but i the cell does not get "selected" by the highlight box, or at least it is not visible. This is what leads me to believe some memory issues happen once the error is thrown. Like the workbook is blown up...
Full Code Below
Bookmarks