03856me
Active Member
- Joined
- Apr 4, 2008
- Messages
- 297
I upgraded from 2013 to 2019 and when my code tries to refresh a pivot table, I receive this error: Run-time error '1004': A PivotTable report cannot overlap another PivotTable report.
There is only one pivot table on this worksheet, so no reason for the error unless there is something wrong with my code. Other users with 2013 are not having any issues and continue to enter data. This workbook has been working correctly for 5+ years, until now. Any advice?
There is only one pivot table on this worksheet, so no reason for the error unless there is something wrong with my code. Other users with 2013 are not having any issues and continue to enter data. This workbook has been working correctly for 5+ years, until now. Any advice?
VBA Code:
Private Sub Worksheet_Activate()
Application.ScreenUpdating = False
ActiveSheet.PivotTables(1).PivotCache.Refresh <<<<<< PROBLEM ROW USING THE DEBUG OPTION
ActiveSheet.PageSetup.PrintArea = _
"$C$5:$L$" & Range("C1000").End(xlUp).Row
Application.ScreenUpdating = True
End Sub