Functions and subprocedures in VBA use pass-by-reference (by default), which can result in unexpected behavior if the parameters of the function are modified. Which function or sub procedure modifies its parameter?
Answer
a. Function a(lngA As Long) As Long
a = lngA * 2
End Function
b. Function b(lngA As Long) As Long
lngA = lngA * 2
End Function
c. Sub c(lngA As Long)
Dim lngB As Long
lngB = lngA * 2
End Sub
d. Function d(lngA As Long) As Long
d = d * 2
End Function