ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pivot Tables - refresh from Userform command button (https://www.excelbanter.com/excel-programming/436730-pivot-tables-refresh-userform-command-button.html)

Roger on Excel

Pivot Tables - refresh from Userform command button
 
[Excel 2003]

I have a question regarding the activation of pivot table refreshes from a
userform.

I tried to use the following code in a command button without success:

ActiveSheet.PivotTables("PovotTableName").RefreshT able

I think the code doesnt work because the userform is in another
sheet to the pivot table, however I need this to be the case since I have 10
different sheets, each with a different pivot table.

Can anyone help ?


John

Pivot Tables - refresh from Userform command button
 
Roger,
Always worth looking in the VBA helpfile which gives good direction on both
questions.

Try following & see if helps:

Application.DisplayAlerts = False

Sheets("Piviot").PivotTables("PivotTable1").Refres hTable

Application.DisplayAlerts = True
--
jb


"Roger on Excel" wrote:

[Excel 2003]

I have a question regarding the activation of pivot table refreshes from a
userform.

I tried to use the following code in a command button without success:

ActiveSheet.PivotTables("PovotTableName").RefreshT able

I think the code doesnt work because the userform is in another
sheet to the pivot table, however I need this to be the case since I have 10
different sheets, each with a different pivot table.

Can anyone help ?


Roger on Excel

Pivot Tables - refresh from Userform command button
 
Thanks John,

The code works very nicely,

All the best,

Roger

"john" wrote:

Roger,
Always worth looking in the VBA helpfile which gives good direction on both
questions.

Try following & see if helps:

Application.DisplayAlerts = False

Sheets("Piviot").PivotTables("PivotTable1").Refres hTable

Application.DisplayAlerts = True
--
jb


"Roger on Excel" wrote:

[Excel 2003]

I have a question regarding the activation of pivot table refreshes from a
userform.

I tried to use the following code in a command button without success:

ActiveSheet.PivotTables("PovotTableName").RefreshT able

I think the code doesnt work because the userform is in another
sheet to the pivot table, however I need this to be the case since I have 10
different sheets, each with a different pivot table.

Can anyone help ?



All times are GMT +1. The time now is 01:53 PM.

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