Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a workbook with multiple worksheets. Each worksheet has its own
pivot table. I put this code on the first worksheet with a pivot table and it works great: Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.PivotTables(1).PivotCache.Refresh End Sub But, when I copy this code to the second worksheet, I get this error: "Pivot table is not valid." What's up? S. Jackson |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Okay, I somehow fixed my problem by simply deleting the pivot table on the
second worksheet and then re-inserting it. Everything works fine now. Go figure? S. Jackson "S Jackson" wrote in message ... I have a workbook with multiple worksheets. Each worksheet has its own pivot table. I put this code on the first worksheet with a pivot table and it works great: Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.PivotTables(1).PivotCache.Refresh End Sub But, when I copy this code to the second worksheet, I get this error: "Pivot table is not valid." What's up? S. Jackson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
VBA code to refresh Child Pivot Table | Excel Discussion (Misc queries) | |||
Sheet protection code conflicts with Pivot Table "auto refresh" | Excel Discussion (Misc queries) | |||
Timing of automatic query refresh and macro pivot table refresh | Excel Programming | |||
How To Finish pivot table refresh before cont. VBA code | Excel Programming | |||
Pivot Table REFRESH Flaw -- Saves Old Data in Selection Area AFTER REFRESH | Excel Programming |