Hi, im really confused and i cant work out why this does this.
VB Code:
Private Sub Form_Load() Dim a As Long a = 10 c = f(a) MsgBox a End Sub Private Function f(b As Long) As Long b = b + 1 End Function
Can someone please explain why a = 11 after this code is done?
i thought that you had to use ByRef keyword if you wanted to change the original value??
ie
VB Code:
Private Function f(ByRef b as long) as long
How is it possible that 'a' variable changes when all im doing is passing the 'a' value to the function?
