Screencast-O-Matic is the free and easy way to record your screen.   Try our free Screen Recorder!

Passing ByRef (by reference)

Created: Mar 16 2017

Description

Passing arguments to subs/procedures ByRef (by reference) - can also be done with functions. Shell program available at www.bowerpower.net/compprog1/vb06/DiceGame.zip

Notes

1:31

Writing parameters using ByRef so arguments are passed by reference

3:12

Using the parameter variable (intDieValue) to affect the argument variable (intPointsDie1 in btnRollDice_Click)

3:38

Using the parameter variable (picDie) to affect the argument variable (picDie1 in btnRollDice_Click)

5:43

Activating/calling the RollOneDie sub - the arguments will be passed byRef (by reference) so any changes made in the RollOneDie sub will also impact the argument variables in the RollDice_Click sub

8:01

Using a breakpoint to watch the values of the variables change

Advertisement
close We use cookies to optimize the experience on our website. By continuing to use our website, you are agreeing to our use of cookies. You can learn more in our Privacy Policy.