Simple VBA Accumulator (Function?)
Can a function get repeated values, add them, and return a total to
the calling procedure?
I need to reuse this code with differing numbers of items.
Example
Pass these parameters
add_to(1)
add_to(2)
Get the returned total from function
function accum(number)
total = total + number
RETURN TOTAL to Procedure
|