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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
7,430
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,430
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,118,962
Messages
5,575,260
Members
412,651
Latest member
caitlincole
Top