How to use Strings in VBA?

Strings are a sequence of characters, which can consist of either alphabets, numbers, special characters, or all of them. A variable is said to be a string if it is enclosed within double quotes " ".

Syntax


variablename = "string"

Example:

* str1 = "string"   ' Only Alphabets
* str2 = "132.45"   ' Only Numbers
* str3 = "!@#$;*"  ' Only Special Characters
* Str4 = "Asc23@#"  ' Has all the above