Hi everyone,
Solved it through trial and error and help. Code posted to help others.
Public Function Join2(seperator As String, rng As Variant) As String
'http://stackoverflow.com/questions/13121413/how-to-display-selected-range-of-cells-in-textbox1-using-vba-code
Dim joinedString As String
Dim cell As Variant
Dim v As Integer
v = 0
For Each cell In rng
v = v + 1
joinedString = joinedString & cell & seperator
If v = 5 Then
joinedString = joinedString & vbCrLf
v = 0
End If
Next cell
joinedString = Left(joinedString, Len(joinedString) - Len(seperator))
Join2 = joinedString
End Function
Kingali
Bookmarks