TheUbe said:
So For Example:
Dim AnyString, MyStr
AnyString = "Hello World" ' Define string.
mystring = Left$(AnyString)
I would not need to use the variant that defined how many characters from
the left I wanted it would return the entire string?
No, by "variant" we mean a data type of "variant".
Variant data types can take on "any" type of value. integer, strings, date,
or null....
the "null" is particularly important here, since if you are dealing with
recordsets (and sql), then values return MIGHT be null.
try this in the debug windows:
? left(null,5)
? left$(null,5)
The 2nd example with the $ will ERROR out. In other words, you can NOT use
null
values if you use the $, but you *can* if you leave out the $.
So left() can accept a null value, but left$() cannot....