Thanks Hitesh, it would be great if you could take a look. I expect there is not a solution, but I hope you can help.
Attached is the spreadsheet/program.
Clicking 'Communicate with scope' should correctly open the connection to the scope and get the unit's information. It then reads the two values in cells C10 (labelled a) and C11 (labelled b). Divides C10 by C11 and puts the result in C12 (labelled c=a/b). It then closes the connection to the scope, reporting the status value.
Cell C11 contains the value 1, so everything is fine. To cause an error, change cell C11 to 0.
The program will then crash with a division by zero while the connection to the scope is still open.
On my system (Windows 10, Office 365 running 16 bit), there appears to be no way to exit the debugger without excel crashing. I have tried unplugging the 'scope.
The issue is just an annoyance while debugging. When my program is properly debugged there is no problem - it's just getting to that point!