I need to automatically update a pivot table, I used this code:
Private Sub Worksheet_Deactivate()
ThisWorkbook.RefreshAll
End Sub
and whenever I change sheets I get the pictured error, the debugger highlights "ThisWorkbook.RefreshAll"
I have used that code before and it was working, the only change I can think of that would affect anything is that the source data is now a table, any suggestions of other ways to make this work? Thanks in advance!
Bookmarks