Excel Workbook Open Event macro doesn't always run

后端 未结 10 574
刺人心
刺人心 2020-12-11 04:23

I\'ve got a Workbook_Open event macro (and it\'s in ThisWorkbook) that doesn\'t always run.

  • If Excel is closed and I double-click the .xls file from Windows Ex
10条回答
  •  独厮守ぢ
    2020-12-11 04:27

    This happens when a workbook is closed with an Application.EnableEvents set to false, and then you open another workbook within the same instance of excel opened. To avoid this, make sure that all of your processes that disable events, reenable them before terminating. Special attention to "End" commands, error handlers and "exit sub" sentences in the middle of your program.

提交回复
热议问题