Re: Error handling problem
Not to sound mean, but check your typing. In your form_load subroutine, you state on error goto Err_Form1_Form_Load
, but you have the error labeled as SubErr_Form1_Form_Load
. Making these two the same might help.
Re: Error handling problem
It's a typo... The code compiles and runs!
Re: Error handling problem
second pair of eyes strikes again LOL
Re: Error handling problem
I also have the same problem, have you find any answers ???
if so please answer this.
thanks
Re: Error handling problem
It is important to note the call stack.
What you have may seem correct... But you have to be aware that when you propogate errors, there must be a handler ready waiting for your raise of that error.
In your example you have a error occurring in your form_load event. It may seem that the calling routine would be receiving the error from the form. Put a break point on your array assigment in the form. Run the application. When the program stops on the break point. Select View; Call Stack from the visual IDE. A box will display showing you the call stack.
It will show you there is a break in your call stack between the module function and the form_load event. Something like non-basic code.
The load event does not have something to pass it's error code to. You will notice the same problem if you remove the error handler all together from the form_load event.
Sorry... Can't explain more without looking this up again... But this should give you a start.
-David