climbingalien
New Member
- Joined
- Jul 6, 2011
- Messages
- 7
Hello
I have a function supplied by a member of this message board which works very well. But when the strings it works with are over a certain length it stops working.
im quite a newbi and have no idea how to get this to work with longer text strings. Any pointers?
Thanks in advance.
I have a function supplied by a member of this message board which works very well. But when the strings it works with are over a certain length it stops working.
Code:
Function aconcat(a As Variant, Optional sep As String = "") As String
' Harlan Grove, Mar 2002
Dim y As Variant
If TypeOf a Is Range Then
For Each y In a.Cells
aconcat = aconcat & y.Value & sep
Next y
ElseIf IsArray(a) Then
For Each y In a
aconcat = aconcat & y & sep
Next y
Else
aconcat = aconcat & a & sep
End If
aconcat = Left(aconcat, Len(aconcat) - Len(sep))
End Function
im quite a newbi and have no idea how to get this to work with longer text strings. Any pointers?
Thanks in advance.