Data Tab "Refresh/All" Button Triggering Macro

AlexaS

Board Regular
Joined
Oct 12, 2012
Messages
158
I have what I would think would be a very easy question, but nothing I've found has answered it for me. I apologize if this has been answered (please respond with the link to the answer if it has) but I can't find anything.

What I need to do is this: when an end user clicks the "Refresh" or "Refresh All" button under the Data tab and/or under the Pivot Table Tool options tab (for the entire workbook), a macro needs to run that plops a date/time stamp into a predefined cell in the workbook. I can get the date/time stamp, no problem. I can't get it to run by pressing the button on the tab.

Additional points:
- I've tried doing the macro recorder and when I step through what was recorded (ActiveWorkbook.RefreshAll), the macro works just fine.
- The requirement is to be able to push the "Refresh" or "Refresh All" button and not a separate macro button, because we can't trust the NUMEROUS people who utilize all of the files that my boss wants to add this to, to use the macro button instead of what they are used to

Any help would be appreciated. If I could implement something next week, my boss will probably be over the moon

Thanks!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,215,219
Messages
6,123,687
Members
449,117
Latest member
Aaagu

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