View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default Function variables

Hi
just call your function from the other fucntion/procedure and store the
result in a variable. e.g.

Sub foo()
dim ret_value
ret_value = do_calculate(5)
msgbox ret_value
end sub

function do_calculate(i)
do_calculate = i*2
end function

--
Regards
Frank Kabel
Frankfurt, Germany

"Todd Huttenstine" schrieb im
Newsbeitrag ...
hey guys I have a function and need to preserve its value
once the function ends. I need to store this value as a
variable in another module. Is this possible?


Todd Huttenstine