Visual Basic for Applications Reference

LTrim, RTrim, and Trim Functions

See Also    Example    Specifics

Returns a Variant (String) containing a copy of a specified string without leading spaces (LTrim), trailing spaces (RTrim), or both leading and trailing spaces (Trim).

Syntax

LTrim(string)

RTrim(string)

Trim(string)

The required stringargument is any valid string expression. If string contains Null, Null is returned.