Is there any way to have a sub routine do an "Exit Sub" on the sub it was called from? I.E. In the following, I would want the "Test" MsgBox not to show if the variable > 0. Effectivly, Sub Test() would terminate execution of Sub Main().
Sub Test()
If variable > 0 Then
*** EXIT SUB MAIN BELOW ***
End If
End Sub
Sub Main()
Test()
MsgBox("Test")
End Sub
Sub Test()
If variable > 0 Then
*** EXIT SUB MAIN BELOW ***
End If
End Sub
Sub Main()
Test()
MsgBox("Test")
End Sub