string.Length Property

Returns the count of the number of characters stored in a String variable.

...string.Length

Prerequisites

None

Parameters

None

Remarks

Returns the Integer count of the number of characters that are stored in a String variable. If the value of the String is empty, a count of 0 is returned.

Examples

Dim stg As String          ' Create a new string variable
Dim ii As Integer
stg = "123456"
ii = stg.Length ' ii will be set to 6

See Also

Strings | Len Function