Workbook_Open sub won't run when I open the workbook?

后端 未结 6 583
自闭症患者
自闭症患者 2020-12-11 01:07

This program is supposed to create a button that the user can press to activate a different sub. From my searches online, it seems that the sub below should activate when op

6条回答
  •  無奈伤痛
    2020-12-11 01:07

    Similar to Nazim's event enable via code solution I found out the following fix:

    the fix

    closing all excel workbooks and VBA windows and reopening the one with Workbook_Open() solved it.
    (likely due to the event enabling similar to Nazim's solution linked above).

    problem experience

    As I was debugging and aborted execution, I disabled the events in the running code before abort. I did not notice this circumstance at first and even after close/reopen of my workbook it did not work...

    probable cause

    ...The other open excel workbooks or some global instance somehow "remembered" that the events of the reopened workbook had been turned off.

提交回复
热议问题