View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jnez367@yahoo.com is offline
external usenet poster
 
Posts: 1
Default 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