Len Function
Returns the number of characters in a string or the number of bytes required to store a variable.
Syntax
Len(string | varname)
Arguments:
- String: Any valid string expression.
- Varname: Any valid variable name.
Remarks
The following example uses the Len
function to return the number of
characters in a string:
Example 1:
Dim Length
Length = Len("BSL") 'Returns 3
'Output: 3
Example 2:
Dim MyVar2, Length2
MyVar2 = 12345
Length2 = Len(MyVar2).
'Output: 5