I will try again:
Code: (Select All)
Dim ALong As Long
Dim BInteger As Integer
BInteger = 1
Print "Binteger is"; BInteger
temp& = passMeALongTypeAndIWillChangeIt&(BInteger)
Print "Binteger after call to Function is"; BInteger; " NOT changed! so effectively passed BInteger by Value"
Print: Print
ALong = 1
Print "Along is"; ALong
temp& = passMeALongTypeAndIWillChangeIt&(ALong)
Print "ALong after call to Function is"; ALong; " changed because ALong is same Type as defined in Function so effectively passed by Reference."
Function passMeALongTypeAndIWillChangeIt& (i As Long)
i = i * 10
Print "Inside passMeALongTypeAndIWillChangeIt& i ="; i
passMeALongTypeAndIWillChangeIt& = whoCares
End Function
b = b + ...