As title says, I have a main sub that calls a subroutine that displays a Retry/Cancel Msgbox. On cancel, I want to Exit the subroutine AND not return to the main sub. Currently I have an Exit Sub on cancel, but it only quits the subroutine and continues on the next line of the main sub. Do I need to make this a function and pass a bool back to tell the main sub that it too should stop executing? Here's the snipped piece of my subroutine:
If Result = vbCancel Then Exit Sub
Else
On Error Resume Next
Set oOutlook = GetObject(, "Outlook.Application")
On Error GoTo 0
End If