Conversation started Oct 11, 2014 at 12:37.
Oct 11, 2014 12:37
Public Sub WillThisCrashTheIDE()
    ThisWorkbook.VBProject.VBComponents.Remove ThisWorkbook.VBProject.VBComponents("Module1")
End Sub
^^ written in a module called "Module1"
@RubberDuck it just... runs ;)
Public Sub WillThisCrashTheIDE()
    ThisWorkbook.VBProject.VBComponents.Remove ThisWorkbook.VBProject.VBComponents("Module1")
    MsgBox "Wait, is this code in the project?"
End Sub
does the msgbox show up?
now...
Public Sub WillThisCrashTheIDE()
    ThisWorkbook.VBProject.VBComponents.Remove ThisWorkbook.VBProject.VBComponents("Module1")
    MsgBox "Wait, is this code in the project?"
    Debug.Assert False
End Sub
The module is resurrected, and execution breaks at the failed assertion as expected!
...and then you resume and the module is gone!
 
Conversation ended Oct 11, 2014 at 12:42.