Return the length of a string.
Len (string)
String - (Input, expression, Required)
Specifies the string whose length is to be returned. If a numeric expression is passed, it is first converted to string form. If anything else other than a string is passed, the result is Error. If Null is passed, the string is assumed to be empty.
An integer value containing the length of the passed string.
Len (“abc”) |
Returns 3 |
Len (12.34) |
Returns 5 |
Len (“”) |
Returns 0 |
Len (Null) |
Returns 0 |
Len (Error) |
Returns Error |
Functions are specifically for use in the Macro Editor. Refer to Microsoft's official VB and JScript documentation for scripting equivalents.
Functions | Asc function | Chr function | CSet function | Format function | InStr function | LCase function | Left function | Len function | LSet function | LTrim function | Mid function | Replace function | Right function | RSet function | RTrim function | Space function | String function | TCase function | Trim function | UBound function | UCase function
© 2004-2021 looksoftware. All rights reserved.