ByVal vs ByRef VBA

后端 未结 4 1982
离开以前
离开以前 2021-02-09 21:25

I\'ve tried to attempt something that was answered by JaredPar ByRef vs ByVal Clarification

ByVal in VB.NET means that a copy of the provided

4条回答
  •  广开言路
    2021-02-09 21:50

    i can't remember where i read this, but i know that if you add the bracets () to arguments when calling a sub/function, it is a specific (not an error) way microsoft implented to workaround byref calls (to byval).

    example : lets say you call a sub who has ONLY byref, and 2 arguments:

    call Sub1 (a), (b)

    is a proper way to force Byvalarguments, even if they were initially coded as Byval

提交回复
热议问题