Detect workbook events from .XLA

  • Thread starter Thread starter Conceptor
  • Start date Start date
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.
 
Under Visual Basic Help, see Using Events with the Application Object.

The event procedure you need is App_WorkbookOpen.

David Hager
Excel MVP
 
Back
Top