bluedragon99
asked on
Visual basic simple error checking question On error
How do I reset the on error statement? Example:
on error goto ErrOccured
msgbox "hello world"
'starting here I don't want errors to goto ErrOccured and I may not have any further error checking in place so undesired effects could occur if things went to ErrOccured
BTW is there a way to goto an error trap and then back to your code without goto statements?
on error goto ErrOccured
msgbox "hello world"
'starting here I don't want errors to goto ErrOccured and I may not have any further error checking in place so undesired effects could occur if things went to ErrOccured
BTW is there a way to goto an error trap and then back to your code without goto statements?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use:
on error goto ErrOccured
to jump to ErrOccured when there is an error.
Use:
on error Resume Next
to jump to the next line of code without going to ErrOccured.
This is the most simple way.
on error goto ErrOccured
to jump to ErrOccured when there is an error.
Use:
on error Resume Next
to jump to the next line of code without going to ErrOccured.
This is the most simple way.
ASKER
Open OptionsFrm.LoggingPath.Tex
Print #2, "Test"
Close #2