Reputation: 680
I am trying to trigger a macro to run when an Excel document is opened.
The problem I am running into is that all of my code resides within an Excel add-in. The Workbook_Open event doesn't work because I can't put the code in individual documents, I need it to reside in the add-in and run whenever any document is opened.
Is there a way to modify the Workbook_Open event or is there another way to trigger a macro when a different document is opened?
Upvotes: 8
Views: 8444
Reputation: 23550
You need to use an Application event. There is a good writeup on how to do this at Chip Pearson's site here.
Upvotes: 10