View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default How to know if a variable has been reset inside other function

If your intention is to use the variable in the function and alter it only
temporarily while the function does it job then the answer is to pass
those variables ByVal.
Default is ByRef and that can leave it in an altered state after the
function
is finished.
Best to look this up in the VBA help.

RBS


"Alex St-Pierre" wrote in message
...
Hi,
My program use a lot of function and sometimes, the variables are reset
because it call a function that use the same variable name. I have
sometimes,
Function inside Function inside Function and it's very hard to make all
differents. Is there a way to insure no variable will be reset?? Like a
program compilation or execution option or something else?
Thanks a lot!
--
Alex St-Pierre