Detect workbook events from .XLA

C

Conceptor

Hi,

I am trying to migrate all code from a .xls file to
a .xla file for maintainability purposes. The original
code, when it was in the .xls file, was triggered from
workbook events like Workbook_Open. In the new .xla file,
the Workbook_Open event triggers only when the .xla file
opens, not when other .xls files are opened. I need to
access the events of every opened workbooks in the excel
session *from the .xla file* to make the code run
correctly.

As I noticed, the .xla itself act like it was a workbook
and every events I can catch from there are the .xla's own
workbook events. I need to get events from all other
opened workbooks as well. How can I achieve this?

Thanks in advance.

C.
 
D

David Hager

Under Visual Basic Help, see Using Events with the Application Object.

The event procedure you need is App_WorkbookOpen.

David Hager
Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top