Excel will disable the plugin if it throws an exception, either a C++ exception, C# exception or an SEH exception.
- That's because they are not supposed to do that, which means that something has gone wrong.
- When something has gone wrong with a computer program, you cannot be sure it is doing what it is supposed to do - it could be trashing all of your data, or being a security risk.
- Excel responds to this by stopping it from doing anything
Don't throw exceptions. Use the documented method to return error values.
You don't say what type of plugin - the method is different for each.