ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA SETTINGS - WHAT THEY DO WITH DIFFERENT ERRORS? (https://www.excelbanter.com/excel-programming/417730-vba-settings-what-they-do-different-errors.html)

Sinner

VBA SETTINGS - WHAT THEY DO WITH DIFFERENT ERRORS?
 
Hi,


I would like to know what does different settings gotta do with
scripts, like

1. Tools - Option - General - Break on All Errors
2. Tools - Option - General - Break on Unhandled Errors

I have one script not working when MSVB(xl) was on option 2.
Then I had another script not working when MSVB(xl) was on option 1.

Do I have to change the options each time for each code OR code to
bypass/change/check the options first & do something.


Thx.

JLGWhiz

VBA SETTINGS - WHAT THEY DO WITH DIFFERENT ERRORS?
 
If you set it to break on all errors, then it will pause for every error that
occurs during the course of the procedure running, even though the error has
a handler because it will not check to see if it is handled first.

If you set it to break on unhandled errors, then when an error with a
handler occurs, it just keeps on truckin. But if there is no handler, it
will pause so you can fix the cause of the error or step into the next line
of code, if you don't want to fix the cause of the error. But it will give
you the opportunity to to do something.

I have mine set to break on unhandled errors because I dont want to be
bothered with the ones that I already know about and have built-in remedies
for.

"Sinner" wrote:

Hi,


I would like to know what does different settings gotta do with
scripts, like

1. Tools - Option - General - Break on All Errors
2. Tools - Option - General - Break on Unhandled Errors

I have one script not working when MSVB(xl) was on option 2.
Then I had another script not working when MSVB(xl) was on option 1.

Do I have to change the options each time for each code OR code to
bypass/change/check the options first & do something.


Thx.


Sinner

VBA SETTINGS - WHAT THEY DO WITH DIFFERENT ERRORS?
 
On Sep 27, 2:39*am, JLGWhiz wrote:
If you set it to break on all errors, then it will pause for every error that
occurs during the course of the procedure running, even though the error has
a handler because it will not check to see if it is handled first.

If you set it to break on unhandled errors, then when an error with a
handler occurs, it just keeps on truckin. *But if there is no handler, it
will pause so you can fix the cause of the error or step into the next line
of code, if you don't want to fix the cause of the error. *But it will give
you the opportunity to to do something.

I have mine set to break on unhandled errors because I dont want to be
bothered with the ones that I already know about and have built-in remedies
for.



"Sinner" wrote:
Hi,


I would like to know what does different settings gotta do with
scripts, like


1. Tools - Option - General - Break on All Errors
2. Tools - Option - General - Break on Unhandled Errors


I have one script not working when MSVB(xl) was on option 2.
Then I had another script not working when MSVB(xl) was on option 1.


Do I have to change the options each time for each code OR code to
bypass/change/check the options first & do something.


Thx.- Hide quoted text -


- Show quoted text -


so thats what was happening...
Yippee : D i understand now
Thanks...


All times are GMT +1. The time now is 12:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com