totn Excel

MS Excel 2003: Refresh multiple pivot tables with a button

This Excel tutorial explains how to refresh multiple pivot tables with the click on a button in Excel 2003 and older versions (with screenshots and step-by-step instructions).

Question: In Microsoft Excel 2003/XP/2000/97, is it possible to create a button that will refresh/update multiple pivot tables?

Answer: Yes, you can refresh multiple pivot tables with a button. To do this:

Under the View menu, select Toolbars > Forms.

Microsoft Excel

Create a button in your spreadsheet using the Forms toolbar. To do this, click on the button icon (currently highlighted in picture below) and click on your spreadsheet where you would like the button to appear.

Microsoft Excel

After creating the button, the Assign Macro window should appear. Click on the "New" button.

Microsoft Excel

Then paste in similar code as below in the Button_Click event:

Sheets("Sheet1").Select
ActiveSheet.PivotTables("PivotTable1").RefreshTable
Sheets("Sheet2").Select
ActiveSheet.PivotTables("PivotTable2").RefreshTable

Microsoft Excel

You will need to replace the Sheet1 and Sheet2 with the names of your sheets and PivotTable1 and PivotTable2 with the names of your pivot tables.

To find out the name of a pivot table, right-click on the pivot table and select Table Options.

Microsoft Excel