Functions and subprocedures in vba use pass-by


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

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Functions and subprocedures in vba use pass-by
Reference No:- TGS0111605

Expected delivery within 24 Hours