What do ByVal and ByRef mean and which is the default?

Questions by Beena   answers by Beena

Showing Answers 1 - 1 of 1 Answers

Bhaskar

  • Feb 2nd, 2006
 

If you pass an argument by reference when calling a procedure, the procedure access to the actual variable in memory.  As a result, the variable's value can be changed by the procedure.
If you pass an argument by value when calling a procedure, the variable's value can be changed with in the procedure only outside the actual value of the variable is retained.
 
  Passing by reference is the default in VBA.  If you do not explicitly specify to pass an argurment by value, VBA will pass it by reference. 

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions