Check Value Before Pivot Table Update

DrPib81

New Member
Joined
Aug 27, 2010
Messages
1
Hello all.

I am having a ton of trouble with this one.

I have a SQL Server database which is the source of data read in an excel spreadsheet. This database gets updated on the hour every hour during the work day. To ensure that users don't block jobs running on the server by refreshing the report's pivot table, I created a value to indicate whether the job is running or not.

I have succesfully limited people from refreshing on the click of a button, but there are a few instances where the pivot table refreshes when an item is selected from the pivot table (like project number changes and then it queries MSQuery). I need to catch this second event and cannot figure out how to do it.

When this event is caught, i want to:
  1. Validate that the database is not updating
  2. refresh the database via VBA
Thanks for any help :cool:.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,253
Messages
5,769,051
Members
425,512
Latest member
wannabe_excel_wiz

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
Top