Oorang
Well-known Member
- Joined
- Mar 4, 2005
- Messages
- 2,071
Try to guess the final values of i, j, & k before you run the code.
I got "i" wrong.
Code:
Option Explicit
Sub PredictTheOutput()
Dim i&, j&, k&
i = 10: j = i: k = i
MySub (i)
MySub j
MySub k + 20
MsgBox Join(Array(i, j, k), vbNewLine), vbQuestion, "Did You Get It Right?"
End Sub
Public Sub MySub(ByRef foo As Long)
foo = 5
End Sub
I got "i" wrong.