Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

Len

  • Last UpdatedJul 18, 2023
  • 1 minute read

The Len function determines the number of characters in the Str argument. The LenB function determines the number of bytes in the VarName argument.

  • The Str argument can be any valid string expression. If Str contains Null, Null is returned.

  • The VarName argument can be any valid variable name. If VarName contains Null, Null is returned. If VarName is a Variant, LenB treats it the same as a String and returns the number of characters it contains.

Syntax

Len(Str)

Str:

A string or expression that can represent a valid text value.

Return Value

Returns a Long.

InStr | Left, Left$| Mid| Right

Example

Dim strTest as String
Dim lngStringLength as Long
strTest = "VBA"
lngStringLength = Len(strTest) ' returns 3

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in