Boo,
I view Return as returning to whence I came. Which as Michael suggests is
common across most other languages.
Optionally a value may be included when I return to whence I came.
Unfortunately I am inconsistent on always using Return; I occasionally use
Exit Sub... Which could be considered an odd-ball solution...
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
| Hello tshad,
|
| There is no difference in the IL output from "Return" and "Exit Sub" when
| used in a sub. However, for readability I would suggtest using Exit Sub.
| Return denotes pushing a value back to the caller, which since a sub
doesnt
| have a return value, makes for a less clear intent.
|
| -Boo
|
| > Is there any difference between Return and Exit Sub?
| >
| > I have some code that uses both when I have an error in my Sub.
| >
| > Thanks,
| >
| > Tom
| >
|
|