I have a macro (CMOV) which calls another subroutine (CMOV2) that checks for a condition which, if met, displays a vbokaycancel message box which i set equal to a variable called irep,
I want it if someone hits cancel (irep=2) for it to call off the whole macro. That is not only exit CMOV2 but also exit CMOV.
Currently, I have
If jackal(1) <> vbNullString Then
irep = MsgBox("Warning: You have a selection with two swingarms" _
& " that are on the same radius and cannot swing past one another " _
& Chr$(13) & " Choose Okay if you still wish to proceed otherwise " _
& " choose Cancel to revise your order" & Chr$(13) & " " _
& jackal(1) & Chr$(13) & " " & jackal(2), vbOKCancel)
**If irep = 2 Then
Exit Sub**
Else: End If
Else: End If
End Sub
at the end of the subroutine. The issue is that even though this exits the CMOV2, CMOV continues to run. Is there a way to end this sub, and the one which called it?