| Start |
|---|
| Escaping the " character VBA syntax requires that a string-literal appear within |
| Assigning long string literals The VBA editor only allows 1023 characters per line, but typically only the first 100-150 characters are visible without scrolling. If you need to assign long string literals, but you want to keep your code readable, you'll need to use line-continuations and concatenation to assign your string. VBA will let you use a limited number of line-continuations (the actual number varies by the length of each line within the continued-block), so if you have very long strings, you'll need to assign and re-assign with concatenation. |
| Using VBA string constants VBA defines a number of string constants for special characters like:
You can use these constants with concatenation and other string functions to build string-literals with special-characters. Using RemarksThe assignment of string-literals in VBA is confined by the limitations of the IDE and the codepage of the current user's language settings. The examples above demonstrate the special-cases of escaped strings, special, non-printable strings and long string-literals. When assigning string-literals that contain characters that are specific to a certain codepage, you may need to consider internationalization concerns by assigning a string from a separate unicode resource file. |
Read Article
https://develop.horje.com/learn/1434/reference