Excel 2019 Refresh Pivot Table overlap message

03856me

Active Member
Joined
Apr 4, 2008
Messages
277
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?

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
 

Some videos you may like

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
7,128
maybe
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
  Worksheets("Sheet1").PivotTables("PivotTable1").PivotCache.Refresh
End Sub
 

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
7,128
so you need to wait for someone else

or try to move another PT a bit further

one PT doesn't move another PT so maybe try Power Query where one table move another table
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,114,521
Messages
5,548,541
Members
410,846
Latest member
rafferty1702
Top