Join97

Simulates the Join function that is not available in Excel 97.


Function Join97(aSrcArray As Variant, _
    Optional sDelimeter As String = ” “) As String

    Dim i As Long
    Dim sTemp As String
    
    For i = LBound(aSrcArray) To UBound(aSrcArray)
        sTemp = sTemp & aSrcArray(i) & sDelimeter
    Next i
    
    sTemp = Left(sTemp, Len(sTemp) – Len(sDelimeter))
    
    Join97 = sTemp
    
End Function

Posted in Uncategorized


Posting code? Use <pre> tags for VBA and <code> tags for inline.

Leave a Reply

Your email address will not be published.