Discussion Locked

Default Error Handling Mode in VBA

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am having a problem with a VBA application.

VBA is defaulting its error handling mode to Break in Class Module when the project is reloaded. I have classes in my VBA project that have proper error handling and I need the error handling mode tobe Break on Unhandled Errors.

I'm looking for a way to change the default error handling mode or a way to change the error handling mode programatically.

I have found registry settings to change the default value for VB but not for VBA.

My VBA application is running on top of RSView but I don't think that the issue is RSView specific because I have seen posts on newsgroups for the same issue in VBA in Excel as well.

3 replies

by pancras

currentStat= application.GetOption("error trapping")
retrieves the current value

application.SetOption "error trapping",1
sets error trapping to Break in class module

regards,
pancras

by graeme.yallop

In RSView the application object does not have a SetOption method. When I try the described solution I get the following error.

438 - - Object doesn't support this property or method

This discussion is closed to new replies.