How to pass Array as a parameter to the function?
srihaliostar
Forums
I stored field names in a array and tried to pass array as a parameter to a function but Idea threw an error.
sub main
Dim fieldname(2) as String
fieldname(0) = "Acct_num"
fieldname(1) = "Acct_Desc"
fieldname(2) = "JE_num"
PrintArray(fieldname)
end sub
Function PrintArray(Arrayname() as String)
for i = 0 to ubound(Arrayname)
msgbox Arrayname(i)
next
End Function
Any one got a solution?
Hi Srihaliostar,