Rob Frank wrote:I see you say its just your opinion not to use exit sub so can i ask what your preferred method is?
I like to use a control variable, which you are setting you called it
blnInputOk. The case for having many 'exit sub' lines is the case for having many return lines in Java.
Both are perfectly valid and used by many different programmers. I suggest you pick a style/preference and stick with it when working on a project.
If you look at the code that I created you see that I wrapped an if statement around many of the blocks.
I could nest the if statements more to do something like:
Which may or may not be a better solution or easier to read. With this, are not use the blnInputOk variable.
In the end the question that you have to ask yourself is "Which style do I think is easier to follow?".
The one that you think is easier to follow is the one that you should use.
Eventually you will most likely have revisit your code and if it's easy to follow then it will be easier to update.