| Start |
|---|
Declare a string constant |
Declare a variable-width string variable |
Declare and assign a fixed-width string |
Declare and assign a string array |
| Assign specific characters within a string using Mid statement VBA offers a Mid function for returning substrings within a string, but it also offers the Mid Statement which can be used to assign substrings or individual characters withing a string. The Note: If you need to assign to individual bytes in a string instead of individual characters within a string (see the Remarks below regarding the Multi-Byte Character Set), the |
| Assignment to and from a byte array Strings can be assigned directly to byte arrays and visa-versa. Remember that Strings are stored in a Multi-Byte Character Set (see Remarks below) so only every other index of the resulting array will be the portion of the character that falls within the ASCII range. RemarksStrings are a Reference type (opens new window) and are central to most programming tasks. Strings are assigned text, even if the text happens to be numeric. Strings can be zero-length, or any length up to 2GB. Modern versions of VBA store Strings internally using a Byte array of Multi-Byte Character Set bytes (an alternative to Unicode). |
Read Article
https://develop.horje.com/learn/1434/reference