hello,

i tried using the following code in a command button macro
*************************************
Sheets("Pivot of Data Collection").Select
ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh
Sheets("Download Pivot").Select
ActiveSheet.PivotTables("PivotTable3").PivotCache.Refresh

*************************************
and also in a worksheet, worksheet activate and then when i changed
worksheet or clicked the command button it threw an error at me when it tried
to run the macro, it doesn't seem to be able to use the code above