D
David W. Fenton
=?Utf-8?B?SmFjayBMZWFjaA==?= <dymondjack at hot mail dot com> wrote
in news:[email protected]: [quote
me, unattributed:]
This does not alter my advice one iota. If you're going to call the
code in the situations where you can use only functions then it's a
requirement that it be a function.
This is not an argument for writing nothing but functions (and I
don't mean to imply that I think you were suggesting that).
in news:[email protected]: [quote
me, unattributed:]
Just as a side note to OP, there is one significant advantage to
using a Function over a Sub (assuming you understand the Null
variant it may return without a value applied)... When working
elsewhere besides VBA, Public Subs are not callable.
For instance, SQL strings, Conditional Formatting, Menu/Toolbar
commands, Control sources, Macros (thought the only one you should
be using is the Autoexec macro) etc etc. These "Access-side"
utilization of code will only work with functions (or properties,
if you want to go there). You cannot reference Subs this way.
This does not alter my advice one iota. If you're going to call the
code in the situations where you can use only functions then it's a
requirement that it be a function.
This is not an argument for writing nothing but functions (and I
don't mean to imply that I think you were suggesting that).