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

I have a macro that load new data and I need to refresh several pivot tables.
I am using the

For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.RefreshTable
Next pt
Next ws

[PivotTables] is the name of the sheet

I get the error "Runtime Error 438 Object doesn't support this property or
method"

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 64
Default Macro pt.RefreshTable

Hi. I used the following code and it works fine as a macro.. On what
line do you get the error??

Sub Pivots()
For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.RefreshTable
Next pt
Next ws
End Sub

On Aug 15, 1:06 pm, Paul Dennis
wrote:
I have a macro that load new data and I need to refresh several pivot tables.
I am using the

For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.RefreshTable
Next pt
Next ws

[PivotTables] is the name of the sheet

I get the error "Runtime Error 438 Object doesn't support this property or
method"

Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default Macro pt.RefreshTable

For Each pt In ws.PivotTables

"KLZA" wrote:

Hi. I used the following code and it works fine as a macro.. On what
line do you get the error??

Sub Pivots()
For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.RefreshTable
Next pt
Next ws
End Sub

On Aug 15, 1:06 pm, Paul Dennis
wrote:
I have a macro that load new data and I need to refresh several pivot tables.
I am using the

For Each ws In ActiveWorkbook.Worksheets
For Each pt In ws.PivotTables
pt.RefreshTable
Next pt
Next ws

[PivotTables] is the name of the sheet

I get the error "Runtime Error 438 Object doesn't support this property or
method"

Any ideas?




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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor [email protected] Excel Programming 2 March 30th 07 07:48 PM
using the RefreshTable method Randy Harris Excel Programming 0 February 18th 05 01:14 AM
RefreshTable vs PivotCache.Refresh Paul Lautman Excel Programming 0 September 24th 04 04:17 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 07:27 AM.

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"