jrobin5881
Technical User
I constructed a pivot table of the data on sheet 3 in the workbook and then renamed the pivot table worksheet "Rollup". What I'm trying to do is have the pivot table located on "Rollup" refresh automatically if/when I edit sheet 3 where the original information is stored.
But the code I'm using below (which I have attached to sheet 3) will not fire when I change any data?
But the code I'm using below (which I have attached to sheet 3) will not fire when I change any data?
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'If data on this worksheet changes, refresh the pivot table
Sheets("Rollup").PivotTables("PivotTable1").RefreshTable
End Sub