antaeusguy
Board Regular
- Joined
- Mar 8, 2010
- Messages
- 81
Hi
I have 2 procedures - one is the main and the other one is for checking/validation.
It looks like this:
Sub Main()
...
Call CheckNValidation
...
...
End Sub
Sub CheckNValidation()
...
(Code which does some checking... if successful, go back to Main, if fail, Exit Sub)
...
Exit Sub
...
End Sub
The problem with the code is, If in the CheckNValidation() resulted in fail, it continued to go back to the Main()...
If I put the CheckNValidation inside Main, I would have no problem... but because the code in CheckNValidation is long and I wish to make this into a separate procedure, so I decided to split into two which the Main() calls up CheckNValidation().
Anyone could help me with this code would be much appreciated!
I have 2 procedures - one is the main and the other one is for checking/validation.
It looks like this:
Sub Main()
...
Call CheckNValidation
...
...
End Sub
Sub CheckNValidation()
...
(Code which does some checking... if successful, go back to Main, if fail, Exit Sub)
...
Exit Sub
...
End Sub
The problem with the code is, If in the CheckNValidation() resulted in fail, it continued to go back to the Main()...
If I put the CheckNValidation inside Main, I would have no problem... but because the code in CheckNValidation is long and I wish to make this into a separate procedure, so I decided to split into two which the Main() calls up CheckNValidation().
Anyone could help me with this code would be much appreciated!