Can't enter break mode at this time

后端 未结 4 1058
花落未央
花落未央 2021-01-15 03:04

This has been happening increasingly, when I have a sheets.add or sheets.delete in excel VBA. After searching and searching I finally found the official Microsoft support pa

4条回答
  •  春和景丽
    2021-01-15 03:20

    Deleting certain objects including ActiveX objects actually changes the VB project. It took me some time to realize that the following line of code prevented the VBE from entering break mode:

    Excel.ActiveSheet.DrawingObjects.Delete
    

    If you can identify the code causing the issue, and the order of operations isn't important, move it to the end of your script.

提交回复
热议问题