Turning an Array into a Comma Delimited String:
Return to List
Function CommaDelimited(inarr As Variant, Optional delim As String = ",") As String
Dim outp As String
Dim thruarr As Integer
For thruarr = LBound(inarr) To UBound(inarr)
outp = outp & CStr(inarr(thruarr)) & IIf(thruarr < UBound(inarr), delim, "")
Next thruarr
CommaDelimited = outp
End Function