Concatenate Array

Vishesh's picture

This is a small piece of code that can be used to concatenate the elements of an array.

You can use it on elements of a listbox or combobox. See the attached file for reference.


Function ConcatenateArrayElements(arrElement As Variant, Optional  _ 
strConcatenator As String = ", ") As String
 ConcatenateArrayElements = Join(arrElement, strConcatenator)
End Function




ConcatenateArray.xls24 KB
YasserKhalil's picture

How can I concatenate from

How can I concatenate from the range itself

MsgBox ConcatenateArrayElements(Sheet1.Range("A2:A6"), ", ")