Thread: ByRef v ByVal
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default ByRef v ByVal

"Jennifer Murphy" wrote:
It is my understanding that I should use the ByVal
keyword if I am planning to modify the parameter.
Is that correct?


It depends on your objectives.

Yes, use ByVal if you do not want the caller to see the change.

No, use ByRef (default) if you want the caller to see the change.

The latter is not unusual.