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 Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

sandy666

Well-known Member
Joined
Oct 24, 2015
Messages
7,076
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,076
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,113,940
Messages
5,545,112
Members
410,659
Latest member
theloudbloke
Top