This will prevent BO from showing the VBA debugger when an error occurs. It even works with compiling/linking errors (asuming the procedure where you made the previous asignment has not compiling/linking errors). By linking, I refer to linking with external libraries.
For best safety, I use both solutions: [tt]On Error[/tt] and [tt]BreakOnVBAError[/tt]. The main macro is similar to:
[tt]
Sub MainMacro (...)
On Error Resume Next
Application.Interactive = true
Application.BreakOnVBAError = true
end Sub
[/tt]
Where [tt]ActualMacro[/tt] is the procedure wich makes the real task. I use [tt]On Error[/tt] and error treatment inside [tt]ActualMacro[/tt] where needed, as erwan says.
This combined solution is useful when, for example, your macro ([tt]ActualMacro[/tt] in this case) uses a library that is not present on the computer the document is running on.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.