excel vba join variant array

The solution for “excel vba join variant array” can be found here. The following code will assist you in solving the problem.

Public Function ConcatenateRange(pRange As Range, Optional pDelimiter As String = ” “) As String
ConcatenateRange = Join(WorksheetFunction.Transpose(pRange.Value), pDelimiter)
End Function

Sub TestMe()
Dim r As Range
Set r = ThisWorkbook.Worksheets(1).Range(“A1:A10”)
MsgBox ConcatenateRange(r)
End Sub

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts