All else being equal (a rather broad assumption), I would write a single
procedure that takes either optional arguments or a variable number of
arguments using a ParamArray. The proc would take action based on which
arguments are included and what their values are. I think this makes the
proc much better suited to reuse in a variety of ways. The only caveat that
I would offer is that the function and its parameters must be very well
documented to allow for real reuse across multiple projects.
I have a rather large library of code that I include in projects either as
modules or as single procedures. I have reused the same code in many
projects over the years. Code reuse is a good thing. Of course, the code
must be well designed and documented, but it is worth the effort to get a
library of plug and play procedures.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)
"Barb Reinhardt" wrote in message
...
What do you all consider to be best practices in VBA coding
1) Creating a called procedure with multiple arguments that can be
reused
2) Creating multiple called procedures without arguments that are
specific
to each time it's called?
I know what I think, but want to get your take on it.
Thanks,
Barb Reinhardt