'Macros enabled upon restart?

Question to Excel specialists:

I was confronted with some inexplicable XLAM behaviour from users in recent days. A bit of screen sharing today piqued my curiosity. The affected user had an XLB file loaded. I enquired about that. His answer: Windows had performed an update and when he logged in after, this Excel session had bootstrapped itself.

The XLAM is stateful. It constructs the initial state on Auto_Open. I have a FEELING that when Excel launches in the particular fashion described, it disables the macros on the workbooks it loads.

I do not know any way of checking whether a given workbook in an Excel session is macro-enabled or not. In fact, the only way I know of enabling macros after they had been disabled is by reloading the workbook. So, I cannot tell whether this XLAM has macros enabled. And I know of no way of reloading an XLAM either.

The circumstance that other workbooks loaded later into that same session had their macros enabled (which apparently allows them to call the XLAM) does not produce the required initialization - and that would explain the cascade of #Value!s.

Can anyone confirm or deny my feeling? Thanks for reading.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source