Hello,
Trying to get an automatic refresh of tables and pivot table with the following macro:
Sub Refresh()
'
' Refresh Macro
'
ActiveWorkbook.Connections("Power Query - Jan2008").Refresh
ActiveWorkbook.Connections("Power Query - Feb2008").Refresh
ActiveWorkbook.Connections("Power Query - Mar2008").Refresh
ActiveWorkbook.Connections("Power Query - Transactions").Refresh
Worksheets("Transactions").PivotTables("PivotTable1").PivotCache.Refresh
End Sub
What ends up happening is that the Refresh button(that contains the macro) has to be pushed twice in order for the pivot table to refresh. Ideal behaviour is to only have to click the Refresh button once for tables and pivot table to refresh.
Any ideas on how above can be tweaked to accomplish a one click refresh?
Thanks, Tom C
Trying to get an automatic refresh of tables and pivot table with the following macro:
Sub Refresh()
'
' Refresh Macro
'
ActiveWorkbook.Connections("Power Query - Jan2008").Refresh
ActiveWorkbook.Connections("Power Query - Feb2008").Refresh
ActiveWorkbook.Connections("Power Query - Mar2008").Refresh
ActiveWorkbook.Connections("Power Query - Transactions").Refresh
Worksheets("Transactions").PivotTables("PivotTable1").PivotCache.Refresh
End Sub
What ends up happening is that the Refresh button(that contains the macro) has to be pushed twice in order for the pivot table to refresh. Ideal behaviour is to only have to click the Refresh button once for tables and pivot table to refresh.
Any ideas on how above can be tweaked to accomplish a one click refresh?
Thanks, Tom C