You can use "+" for concatenation although it is not recommended as this is a WordBasic operator. You should use "&".
When using the string concatenation character "&" be sure to insert a space before and after this operator.

String Concatenation (&)

This operator can be used to join two or more strings together.
This operator can also automatically convert between types as it combines a resultant string.
It can be used to combine several different variable types into a string without any explicit conversion.

String Concatenation (+)

This can also be used as a string addition operator to join two or more strings together.
If you try to use this operator with multiple variables types you will receive a "Type Mismatch" error.

Dim MyNumber As Variant 
MyNumber = "2"
MyNumber = MyNumber + MyNumber + MyNumber
Msgbox MyNumber ' "222"

JOIN Function

JOIN - Returns a text string containing all the elements in an array (String).

© 2023 Better Solutions Limited. All Rights Reserved. © 2023 Better Solutions Limited TopPrevNext