Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Macro Question. Is refresh needed?

Hello All,

Hope someone can answer this for me.

In the code below I was told to refresh the pivot table, yet the code
runs and the un-needed items disapear even with out the refresh.

Can someone tell me why the refresh statement is needed?


Dim pt As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Dim SFld As String
SFld = "Uplift month"

For Each pt In ActiveSheet.PivotTables
Set pf = pt.PivotFields(SFld)
For Each pi In pf.PivotItems
pi.Caption = pi.SourceName
Next pi

pt.RefreshTable
Next pt

End Sub

Thanks everyone

Doug

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
MS Query refresh question Dave H Excel Discussion (Misc queries) 0 May 2nd 11 04:12 PM
web refresh question teepee[_3_] Excel Discussion (Misc queries) 2 January 5th 09 02:54 PM
Automatic Refresh Question smonczka Excel Programming 3 March 2nd 07 02:29 PM
Pivot Auto Refresh Help Needed jgp_2 Excel Programming 2 November 22nd 05 08:44 PM
Timing of automatic query refresh and macro pivot table refresh dutty Excel Programming 2 December 1st 04 07:19 PM


All times are GMT +1. The time now is 10:32 AM.

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"