Excel 2016 (or 365) does not seem to fire the Workbook_Open() sub reliably or more precisely, not at all! The simple event sub
Private Sub Workbook_Open()
MsgBox "Work book is open"
End Sub
does not seem to work. However, if a workbook is already open and then the workbook containing the above Sub is then opened, it does run as expected. I notice that unlike Excel 2010, 2016 (365) opens each workbook in its own window, not a workbook window in the Excel application window. Is this a bug in 2016 and is there a workaround?
I have produced a work around for my own applications and that is call the activation of a worksheet and call my initialization routines from there. But a bit "rough" and it would be good to have the Workbook_Open() sub working correctly.
It is a simple single Sub in the ThisWorkbook module. Macros are enabled. In Excel 2010 it works perfectly, as do two other macros in other workbooks for which I have written macros. It is just this one thing with Excel 2016. Given that the Workbook_Open() sub is the gateway to a workbook it seems a little strange that we have to go to a workaround to make it function.
Workbook_Openmacro, saved it (macro-enabled), closed Excel, double-clicked the file in Windows Explorer, and the macro fired OK (after I selected "enable macros" of course). (b) The default behaviour now is for new workbooks to be opened within the one instance of Excel, but the windows are not "locked" together - i.e. not constrained by a single rectangular border. The fact that the windows are not constrained by the same border shouldn't (AFAIK) affect the way they operate. (And there is a workaround to open new instances of Excel.) - YowE3K