But it depends whether the procedure it nested inside
another loop... (which needs to be made aware of how the called
procedure progressed..and I'd use a module boolean variable for that.
if it's NOT a 'nested' call you can do without the boolean
dim bCancel as boolean
Sub main()
bCancel=false
proc1
if bcancel then proc3
end sub
sub proc1()
if vbno=msgbox("continue",vbyesno) then
msgbox "oops"
bCancel=true
proc2
exit sub
else
Msgbox "I'll get to work"
endif
'code continues here
end sub
sub proc2
msgbox "I'll do the cleanup"
end sub
sub proc3
msgbox "I'll make the report"
end sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.