8
votes

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?

1

1 Answers

9
votes

You need to use an Application event. There is a good writeup on how to do this at Chip Pearson's site here.