VBA Len function

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Len Function Description

The VBA Len function returns the character length of a specified string.

Syntax

The syntax for the Len function in VBA is:

Len( text )

Parameters

text
The string for which the character length is to be returned for.

Example usage

The Len function can be used in VBA code. Let’s look at some VBA Len function examples:

Len "Hello"
'Result: 5

Len "Hi There!"
'Result: 9

Len ""
'Result: 0

Simply the best place to learn VBA!