Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Refresh order when refreshing all in a workbook

I created a workbook with two sheets. In sheet1 there is a table connecting
to an external data source (From Sql Server). Sheet2 has a pivot table of
which ithe data are bases on the table of sheet1.

Now when I click the refresh all button to refresh all objects in the
workbook, the order is refresh pivot table first, and then the table of
external data. So we have to refresh all again or refresh the pivot table
individually.

Is this a bug? Can we manually change the refresh order to refresh external
data first, then the pivot table based on it?
  #2   Report Post  
Posted to microsoft.public.excel.misc
KC KC is offline
external usenet poster
 
Posts: 94
Default Refresh order when refreshing all in a workbook

One way could be to refresh the pivottable when you select the Sheet2. Right
click on worksheet tab (Sheet2) and click select code.
paste the below code

Option Explicit
Private Sub Worksheet_Activate()

Dim ptTemp As PivotTable

For Each ptTemp In Me.PivotTables
ptTemp.RefreshTable
Next ptTemp

End Sub



So whenever you open Sheet2, the pivottable date would be refreshed.

Regards,
-kc
*Click YES if this helps



"Michael Pan" wrote:

I created a workbook with two sheets. In sheet1 there is a table connecting
to an external data source (From Sql Server). Sheet2 has a pivot table of
which ithe data are bases on the table of sheet1.

Now when I click the refresh all button to refresh all objects in the
workbook, the order is refresh pivot table first, and then the table of
external data. So we have to refresh all again or refresh the pivot table
individually.

Is this a bug? Can we manually change the refresh order to refresh external
data first, then the pivot table based on it?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Refreshing Workbook Connections with Access Jack PDX Excel Discussion (Misc queries) 0 March 26th 09 07:02 PM
Refresh pivot table in workbook A when changing a cell in workbook gildengorin Excel Worksheet Functions 2 March 17th 09 04:59 PM
Refreshing Pivot Tables in a Shared Workbook Pedro Excel Worksheet Functions 0 January 31st 07 09:41 PM
Why are the cells of my workbook not refreshing? Kurt Paradise Excel Worksheet Functions 1 April 7th 05 03:09 PM
Can you reformat order of items in Pivot Tables after refresh? marmur1 Excel Discussion (Misc queries) 1 March 21st 05 01:19 PM


All times are GMT +1. The time now is 08:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"