Excel VBA Macro Programming

This concatenates two operands together.

MsgBox "Richard " & "Shepherd"

This gives the result ‚“Richard Shepherd. ‚½ Note that a space was left at the end of "Richard " to give the space in the final string.

You can also concatenate numbers and strings, but remember that the result will be a string. The following gives the result ‚“12 Twelve ‚½:

Msgbox 12 & " Twelve"

The following gives the result 34, but as a string not a number:

Msgbox 3 & 4

Категории