Trouble refreshing PivotTables w/ VBA

Arvi

New Member
Joined
May 12, 2002
Messages
1
Hello all.

I'm trying to refresh PivotTables from a macro, using the folowing code:

Sheets("PTable").PivotTables("PivotTable1").RefreshTable

When I step through the macro (using F8), this line executes fine and refreshes the PivotTable successfully. However, when I run the macro from a button on the sheet, the PivotTable does not get refreshed.

Any ideas? I'm stumped.

Thanks.
This message was edited by Arvi on 2002-05-13 09:54
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi Arvi,

This may be a bit of "shooting in the dark," but I've had problems like this that went away when I switched from ActiveX commandbuttons (buttons that come from the Controls toolbar) to Forms buttons (buttons from the Forms toolbar). If you are using the ActiveX type I would recommend you try using the Forms type instead.
 
Upvote 0

Forum statistics

Threads
1,214,833
Messages
6,121,858
Members
449,052
Latest member
Fuddy_Duddy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top