VBA中的错误处理有哪些好的模式?
特别是在这种情况下我应该怎么做:
... some code ...
... some code where an error might occur ...
... some code ...
... some other code where a different error might occur ...
... some other code ...
... some code that must always be run (like a finally block) ...
我想处理这两个错误,并在可能发生错误的代码之后恢复执行。此外,最后的代码必须始终运行 - 无论先前抛出什么异常。我怎样才能达到这个目的?
慕无忌1623718
湖上湖
相关分类