Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return vs. Exit Sub/Function - Clarification

Status
Not open for further replies.

Turpis

Programmer
Apr 16, 2002
151
I was wondering if there was any difference at all in the following statements:

If <something> = True Then Return

or

If <something> = True Then Exit Sub



Charles
Quality Assurance/Developer
 
Yes there is. Return is generally used to return a value from a function whereas Exit is used to exit a procedure.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I understand that...I should have clarified that I have seen "Return" used as an "Exit Sub", specifically by Wei-Meng Lee in some articles on
Charles
Quality Assurance/Developer
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top