Pivot Table Refresh

E

Eric

I believe there is a way to create a button to refresh multiple pivot tables
within the same file, but I can't seem to figure it out.

I'm creating a model and would like less sophisticated users to be able to
use it. I would therefore like to create a simple button to refresh all
pivot tables on the first sheet of the workbook.

Any help is greatly appreciated!!
 
R

Roger Govier

Hi Eric

Add the following code to a button on your page

Sub RefreshAll()
ActiveWorkbook.RefreshAll

End Sub
 
E

Eric

Roger,

Thanks much for your response. I'm guessing it will work once I figure out
how to add code to a button.

Again, any help is greatly appreciated.
 
A

Ashish Mathur

Hi,

In Excel 2007, there is a button to "Refresh All" under Pivot Table Tools >
Options. When you click on that button, all pivot tables should update.
Not sure of whether there is a "Refresh all" in Excel 2003
 
R

Roger Govier

Hi Eric

For XL2003
View>Toolbars>Forms>click the button icon>click a location on your sheet
and drag to the size you want.
You will then be asked what macro you want to add, point to the macro
provided and click OK.

You can change the text of the Button to what you want, by right
clicking on the button, and you can drag it to any position on the
screen that you wish.

For XL2007
You need to have the Developer tab switched on
Click Round Office button>Excel Options>click Show Developer tab
From Developer tab>Controls section>Insert>Form Controls>Button and
proceed as for XL2003

Alternatively in XL2007>insert Tab>Illustrations>Shapes>choose a shape.
Right click on shape and you will see an option to Add macro.
 
E

Eric

Thanks again Roger. That worked perfectly.



Roger Govier said:
Hi Eric

For XL2003
View>Toolbars>Forms>click the button icon>click a location on your sheet
and drag to the size you want.
You will then be asked what macro you want to add, point to the macro
provided and click OK.

You can change the text of the Button to what you want, by right
clicking on the button, and you can drag it to any position on the
screen that you wish.

For XL2007
You need to have the Developer tab switched on
Click Round Office button>Excel Options>click Show Developer tab
From Developer tab>Controls section>Insert>Form Controls>Button and
proceed as for XL2003

Alternatively in XL2007>insert Tab>Illustrations>Shapes>choose a shape.
Right click on shape and you will see an option to Add macro.

--
Regards
Roger Govier

.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top