Quantcast
Channel: Refreshing all the pivot tables in my excel workbook with a macro - Stack Overflow
Viewing all articles
Browse latest Browse all 11

Answer by Kevin for Refreshing all the pivot tables in my excel workbook with a macro

$
0
0

ActiveWorkbook.RefreshAll refreshes everything, not only the pivot tables but also the ODBC queries. I have a couple of VBA queries that refer to Data connections and using this option crashes as the command runs the Data connections without the detail supplied from the VBA

I recommend the option if you only want the pivots refreshed

Sub RefreshPivotTables()       Dim pivotTable As PivotTable       For Each pivotTable In ActiveSheet.PivotTables             pivotTable.RefreshTable       Next End Sub 

Viewing all articles
Browse latest Browse all 11

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>