LTrim
- Last UpdatedJul 18, 2023
- 1 minute read
Strips any leading spaces from Str variable.
Syntax
LTrim(Str)
Str:
A string or expression that can represent a valid text value.
Return Value
Returns a string.
Related Functions
Example
Dim strTest as String
Dim strResult as String
Dim lngStartLength as Long
Dim lngFinishLength as Long
strTest = " VBA"
lngStartLength = Len(strTest) ' returns 9
strResult = LTrim(strTest) ' returns "VBA"
lngStringLength = Len(strResult) ' returns 3