Exiting all functions/subs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a sub that call a fuction, in which I have an if statement that if is
true it does an Exit Function. My question is how can I have it to exit the
sub too, or exit all functions/subs.
thanks!!
 
Return with the function True or False, and by the value returned you eill
knew if to exit the sub or not

Sub MySubName()
' call the function

If MyFunctionName = true then ' Its enough to write - If MyFunctionName
then
exit sub
End if

End Sub
========================
Function MyFunctionName()
If True then
MyFunctionName = true
Else
MyFunctionName = false
End If
End Function
=========================
 

Ask a Question

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.

Ask a Question

Back
Top