Concatenate strings : String « Data Type « VBA / Excel / Access / Word






Concatenate strings

 
Sub cmd()
    Dim lastName As String
    Dim firstName As String

    firstName = "first"
    lastName = "last"

    Debug.Print lastName & ", " & firstName
End Sub

 








Related examples in the same category

1.String data types are used to hold a sequence of characters in a variable.
2.String variable
3.To initialize a string variable, place the string value within double quotes.
4.An example of a declaration for a fixed length string
5.String Concatenation with &