79705506

Date: 2025-07-17 23:19:11
Score: 1
Natty:
Report link

Because I unfortunately had to deal with VBA in 2025, I share my interpretation of the solution of "the hard way" as described by @Henzi. It is important that you make sure that the Collection only contains Strings.

Function StrCollJoin( _
    StrColl As Collection _
  , Optional ByVal JoinStr As String = "" _
  ) As String
  ' ----------------------------------------------------------------------------
  ' - Performs a string join as if the collection was an array of strings
  ' ----------------------------------------------------------------------------
  JoinedStr = ""
  First = True
  For Each Item In StrColl
    If Not First Then JoinedStr = JoinedStr & JoinStr Else First = False
    JoinedStr = JoinedStr & Item
  Next Item
  StrCollJoin = JoinedStr
End Function
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Henzi
  • Low reputation (1):
Posted by: Erick SaldaƱa