【发布时间】:2014-12-25 03:20:53
【问题描述】:
我发现自己在过程结束和错误处理程序中都编写了一些命令。最重要的是,我发现自己在所有函数中都写了这些行:
Application.Cursor = xlDefault
Application.ScreenUpdating = True
ErrHandler:
MsgBox ("An unforseen problem has occured. Please contact support.")
Application.Cursor = xlDefault
Application.ScreenUpdating = True
End Sub
我觉得我重复自己的次数超出了我的预期。在过程末尾和错误处理程序中编写这些“标准”行是否有更好的做法?
【问题讨论】: