auto refresh pivot table

DB73

Board Regular
Joined
Jun 7, 2022
Messages
102
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

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
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,215,480
Messages
6,125,050
Members
449,206
Latest member
Healthydogs

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