Sub String Manipulations Class

CatLine

"Concatenate Line" Add a line of text onto the end of a string representing a paragraph. Concatenate the string representation of a value onto the end of a string, preceded by carriage return and new line characters unless the target string rTo is empty.

Signature (Visual Basic / VBA)

Public Sub CatLine( _
      ByRef rTo As Variant _
    , ByVal vFrom As Variant _
    )

Code Example

       CatLine S, "New"
    is the same as
       S = S & Chr$(13) & Chr$(10) & "New"
    or
       S = S & vbCrLf & "New"

Notes & Version History

Remarks except that no carriage return and line feed characters are added when the target string (rTo) is empty. Subroutine silently does nothing if both arguments (rTo and vFrom) are Null.