Forum Discussion

10500438's avatar
10500438
Icon for Helper II rankHelper II
6 years ago

Trigger Macro after all the Power Queries have updated

I have a power pivot model that has 10 queries, I have it set to refresh all when the workbook is opened. I have an Model Change event to save the workbook. Then a save event that triggers a macro to make a copy of the workbook with a timestamp.

 

I am trying to trigger a the event after ALL the power queries have updated in a single workbook. I have 10 queries and I am using the Model Change event, but as soon as the first query updates, it appears the macro is running. I tried using a VBscript through task scheduler, but it is triggering while the Model is still updating (it takes about 10min for the model to Refresh ALL).

 

I have worked on this for 3 days and I keep running into various issues. Is there a way to delay the Model Change event by 15min or something? Any suggestions are welcomed?

2 Replies