croy said:
What does Left$ mean in VBA? I've been searching the help
for an hour (searching for "Left$"; "$"; "Left"), but can't
find it.
The Left() function returns the leftmost n characters of a string, where the
string and the number n are both passed as arguments to the function. If
Null is passed as the string argument, the function will return Null.
The Left$() version is exactly the same, except that it cannot accept Null
as the string argument and will never return Null. In general, the
string-handling functions have versions with and without the $ suffix. The
version with the $ suffix is a pure string function that can't accept Nulls,
and the version without the suffix is a database-oriented version that can
handle Nulls.
"$" is the string declaration character, which goes all the way back to the
early days of the Basic language.
Dim MyVariable ' declares MyVariable as a Variant
Dim MyVariable$ ' declares MyVariable as a String
Dim MyVariable As String ' declares MyVariable as a String