Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default PivotCache.Refresh

Can anyone help with this error please, when I run the following statement in
my macro

ActiveSheet.PivotTables("DataPivot").PivotCache.Re fresh


Runtime error 1004

Unable to get the PivotTable properties of the worksheet task
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default PivotCache.Refresh

Are you sure that's the name of the pivot table on the active sheet?


Paul Dennis wrote:
Can anyone help with this error please, when I run the following statement in
my macro

ActiveSheet.PivotTables("DataPivot").PivotCache.Re fresh


Runtime error 1004

Unable to get the PivotTable properties of the worksheet task



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default PivotCache.Refresh

On Aug 15, 2:42 pm, Paul Dennis
wrote:
Can anyone help with this error please, when I run the following statement in
my macro

ActiveSheet.PivotTables("DataPivot").PivotCache.Re fresh

Runtime error 1004

Unable to get the PivotTable properties of the worksheet task


If there's one PivotTable on the sheet you can also use:
ActiveSheet.PivotTables(1).PivotCache.Refresh

If you want to verify the name you can use:
Debug.Print ActiveSheet.PivotTables(1).Name


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default PivotCache.Refresh

I was getting the same message. I even tried recording a macro to refresh the
pivot table, but got the same code. It seemed to have worked in Excel 2003
but not in 2007.

I don't have much VBA experience, but when I changed the statement to be,
ActiveSheet.PivotTables("DataPivot").RefreshTable, the macro would continue
to run.

Hope this helps.

Kara
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
Add PivitField to PivotCache Simon Shaw Excel Programming 1 September 26th 06 02:51 AM
PivotCache T. Excel Programming 1 August 18th 06 10:17 PM
Pivotcache Pivot Table Pete Excel Programming 1 August 5th 06 12:38 PM
Update PivotCache Staaan Excel Programming 0 November 30th 05 10:49 AM
RefreshTable vs PivotCache.Refresh Paul Lautman Excel Programming 0 September 24th 04 04:17 PM


All times are GMT +1. The time now is 06:55 PM.

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

About Us

"It's about Microsoft Excel"