ByRef (Visual Basic)

 

Updated: July 20, 2015

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

Specifies that an argument is passed in such a way that the called procedure can change the value of a variable underlying the argument in the calling code.

The ByRef modifier can be used in these contexts:

Declare Statement

Function Statement

Sub Statement

Keywords
Passing Arguments by Value and by Reference

Show: