Explain What do ByVal and ByRef mean and which is the default?
Submitted by: AdministratorIf 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.
Argument Passing ByVal
Describes passing arguments by value, which means the procedure cannot modify the variable itself.
Argument Passing ByRef
Describes passing arguments by reference, which means the procedure can modify the variable itself.
Submitted by: Administrator
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.
Argument Passing ByVal
Describes passing arguments by value, which means the procedure cannot modify the variable itself.
Argument Passing ByRef
Describes passing arguments by reference, which means the procedure can modify the variable itself.
Submitted by: Administrator
Read Online VBA (Visual Basic for Applications) Job Interview Questions And Answers
Top VBA (Visual Basic for Applications) Questions
☺ | Explain 3 main differences between flexgrid control and dbgrid control? |
☺ | Explain the difference between Msgbox Statement and MsgboxQ function? |
☺ | Name of some control used to call a windows application? |
☺ | How To set the command button for ESC, Which property needs to be changed? |
☺ | Explain Which Property is used to compress a image in image control? |
Top Coding/Programming Categories
☺ | Python Interview Questions. |
☺ | OOP Interview Questions. |
☺ | Software engineering Interview Questions. |
☺ | PHP Interview Questions. |
☺ | VBA (Visual Basic for Applications) Interview Questions. |