Remove leading spaces from a string.


   string    A text string or string expression.

The Ltrim() function can be used in VBA or in an SQL query.

Ltrim() will return a Variant, you can also use Ltrim$() to return a String.
You should use Ltrim() if there is any chance of a Null value, since assigning Null to a String will raise an error.


Dim strDemo as String
strDemo = Ltrim("      The world is everlasting")
Returns "The world is everlasting"

“The hands of every clock are shears, trimming us away scrap by scrap, and every time piece with a digital readout blinks us towards implosion” ~ Dean Koontz


Left - Extract a substring from a string
RTrim - Remove trailing spaces from a string.
Trim - Remove leading and trailing spaces from a string.

© Copyright 1999-2016
Some rights reserved