ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivot Table Refresh (https://www.excelbanter.com/excel-programming/415485-pivot-table-refresh.html)

BJ

Pivot Table Refresh
 
I would like to refresh all pivot tables within a specific worksheet. I am
trying to use the 'RefreshAll' function but I'm getting a 'Run-time error
'438' - Object doesn't support this property or method' error message.

I am using the statement

ActiveSheet.RefreshAll

Is this not a possible combination? I've tried changing it to
'ActiveWorksheet' with the same result. If I use 'ActiveWorkbook' it works,
but I only want to update a specific sheet.

thanks.

BJ

Debra Dalgleish

Pivot Table Refresh
 
You can loop through the pivot tables on the worksheet:

Dim pt As PivotTable
For Each pt In ActiveSheet.PivotTables
pt.PivotCache.Refresh
Next pt


BJ wrote:
I would like to refresh all pivot tables within a specific worksheet. I am
trying to use the 'RefreshAll' function but I'm getting a 'Run-time error
'438' - Object doesn't support this property or method' error message.

I am using the statement

ActiveSheet.RefreshAll

Is this not a possible combination? I've tried changing it to
'ActiveWorksheet' with the same result. If I use 'ActiveWorkbook' it works,
but I only want to update a specific sheet.

thanks.

BJ



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


BJ

Pivot Table Refresh
 
Thanks Debra - I was able to co-opt your language from another post but was
just curious to know if there was a 'simpler' way to program what I wanted to
do. Maybe not. Thank you for your help. Thank you also for your website -
you're tips have helped me out of many a jam.

Brett

"Debra Dalgleish" wrote:

You can loop through the pivot tables on the worksheet:

Dim pt As PivotTable
For Each pt In ActiveSheet.PivotTables
pt.PivotCache.Refresh
Next pt


BJ wrote:
I would like to refresh all pivot tables within a specific worksheet. I am
trying to use the 'RefreshAll' function but I'm getting a 'Run-time error
'438' - Object doesn't support this property or method' error message.

I am using the statement

ActiveSheet.RefreshAll

Is this not a possible combination? I've tried changing it to
'ActiveWorksheet' with the same result. If I use 'ActiveWorkbook' it works,
but I only want to update a specific sheet.

thanks.

BJ



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



Debra Dalgleish

Pivot Table Refresh
 
You're welcome Brett, and thanks for letting me know that the tips on my
website have helped you.

There's no simpler way that I know of. RefreshAll can be used on the
workbook, but not the worksheet.

BJ wrote:
Thanks Debra - I was able to co-opt your language from another post but was
just curious to know if there was a 'simpler' way to program what I wanted to
do. Maybe not. Thank you for your help. Thank you also for your website -
you're tips have helped me out of many a jam.

Brett

"Debra Dalgleish" wrote:


You can loop through the pivot tables on the worksheet:

Dim pt As PivotTable
For Each pt In ActiveSheet.PivotTables
pt.PivotCache.Refresh
Next pt


BJ wrote:

I would like to refresh all pivot tables within a specific worksheet. I am
trying to use the 'RefreshAll' function but I'm getting a 'Run-time error
'438' - Object doesn't support this property or method' error message.

I am using the statement

ActiveSheet.RefreshAll

Is this not a possible combination? I've tried changing it to
'ActiveWorksheet' with the same result. If I use 'ActiveWorkbook' it works,
but I only want to update a specific sheet.

thanks.

BJ



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





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



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com