String data types are used to hold a sequence of characters in a variable. : String « Data Type « VBA / Excel / Access / Word






String data types are used to hold a sequence of characters in a variable.

 
Sub str()
    Dim myString As String * 10
    Dim myString2 As String
    myString = "Fred Flintstone"
    myString2 = "Fred Flintstone"
End Sub

 








Related examples in the same category

1.String variable
2.To initialize a string variable, place the string value within double quotes.
3.An example of a declaration for a fixed length string
4.Concatenate strings
5.String Concatenation with &