I am using try, catch, and finally for error checking on fileCopy. If an exception is caught, I choose okay on the message box. The code then continues to execute. I want to stop executing the code and go back to the form. How?
The "Finally" clause of a try..catch..finally construct *always* executes. It's designed to allow you to clean up any resources that you might have used, like database connections, etc.
If you want to return to the form, set a flag in the "catch" part to indicate an exception ocurred. Your code will run through the Finally clause as normal, and then you can test your flag to see if you need to redisplay your form.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.