Hi,
I'm making a simple Access application where I have a few classes with a couple of methods in each of them. When an error occurs in one of these methods I'd like to throw it to the 'parent' (originator) of the function.
In c# you would have something like this:
I found out that I can do something similar in VBA in this form
Would this be a valid way of throwing the error in VBA?
I'm making a simple Access application where I have a few classes with a couple of methods in each of them. When an error occurs in one of these methods I'd like to throw it to the 'parent' (originator) of the function.
In c# you would have something like this:
Code:
try
{
#METHOD EXECUTION#
}
catch (exception ex)
{
Throw ex;
}
I found out that I can do something similar in VBA in this form
Code:
On error goto ErrorHandler
#METHOD EXECUTION#
ErrorHandler:
Err.Raise Err
Would this be a valid way of throwing the error in VBA?
Last edited: