byRef and byVal VBA
ByteWise
0:00 / 0:00
byRef and byVal VBA
4 599 просмотров · 7 лет назад
ByteWise
790 подписчиков
4 599 просмотров · 7 лет назад
In today's video,We will discuss about byVal and byRef in Excel VBA.
Whether we write it explicit or not; passing arguments to Procedure(Function or Sub) has byRef is default option.
When passing arguments by reference we are referencing the original value and when do any manipulation we make the changes
in original value and it store in reference permanently.
When passing arguments by Value we are referencing the copy of original value and when do any manipulation we do not make the changes in original value.
ByVal is good option we need to refer the original value in all the calculation.
Array as parameter can be pass to procedure as byRef only else it will return error.