I've been reading some Microsoft documentation about error handling in VBA and they recommend to include this code in your startup routines to set the appropriate error handling level:
Sub SafeStart()
Application.SetOption "Error Trapping", 1
End Sub
This basically changes this setting inside Tools > Options:
I changed the setting manually and it works great. However I haven't been able to change it through code since VBA throws the error "Object doesn't support this property or method". Any idea how to set this option in VBA or why it's throwing this error?
Thanks
https://msdn.microsoft.com/en-us/library/Ee358847(v=office.12).aspx