auto refresh pivot table

DB73

Board Regular
Joined
Jun 7, 2022
Messages
107
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2010
  6. 2007
Platform
  1. Windows
  2. Mobile
  3. Web
Hi peeps,

im tryin to put a code on the sheet with my pivot table but it aint working
can someone help me out
i put this code on the sheet with the pivot table but when my dump table (othe sheet) is updated its not refreshing the pivot table (table uren)
VBA Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Worksheets("tabel uren").PivotTables("PivotTable6").PivotCache.Refresh
End Sub
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi there...

Have you tried...

VBA Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
   Worksheets("tabel uren").PivotTables(6).PivotCache.Refresh
End Sub
 
Upvote 0
Hi there...

Have you tried...

VBA Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
   Worksheets("tabel uren").PivotTables(6).PivotCache.Refresh
End Sub
yes...didnt work also☹️
 
Upvote 0
And you have made sure that all references to the table, sheet, pivot table are all the same (thinking also make sure everything is in the correct case...
 
Upvote 0
And you have made sure that all references to the table, sheet, pivot table are all the same (thinking also make sure everything is in the correct case...
1683892290627.png
1683892315249.png


i think so
 
Upvote 0
Try...

VBA Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Worksheets("tabel uren").PivotTables("Draaitabel6").PivotCache.Refresh
End Sub
 
Upvote 0
Try...

VBA Code:
Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
Worksheets("tabel uren").PivotTables("Draaitabel6").PivotCache.Refresh
End Sub
doest work also :unsure:....but when i do refresh manually then excel start freeking out...after a while i get this;

method refresh of object pivotcache failled
1683910309388.png


problem;
1683910508756.png
 
Upvote 0

Forum statistics

Threads
1,223,444
Messages
6,172,171
Members
452,445
Latest member
walkman99

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top