LTrim Function

āĻāĻ•āϟāĻŋ āĻ¸ā§āĻŸā§āϰāĻŋāĻ‚ āĻāĻ•ā§āϏāĻĒā§āϰ⧇āĻļāύ⧇āϰ āĻļ⧁āϰ⧁āϤ⧇ āϏāĻŦ āĻĢāĻžāρāĻ•āĻž āĻ¸ā§āĻĨāĻžāύ āϏāϰāĻŋāϝāĻŧ⧇ āĻĢ⧇āϞāĻž āĻšā§ŸāĨ¤

Syntax:


LTrim (Text As String)

Return value:

String

Parameters:

āĻŸā§‡āĻ•ā§āϏāϟ: āϝ⧇ āϕ⧋āύ āĻ¸ā§āĻŸā§āϰāĻŋāĻ‚ āĻāĻ•ā§āϏāĻĒā§āϰ⧇āĻļāύāĨ¤

āĻāĻ•āϟāĻŋ āĻ¸ā§āĻŸā§āϰāĻŋāĻ‚ āĻāĻ•ā§āϏāĻĒā§āϰ⧇āĻļāύ⧇āϰ āĻļ⧁āϰ⧁āϤ⧇ āĻĢāĻžāρāĻ•āĻž āĻ¸ā§āĻĨāĻžāύ āϏāϰāĻžāϤ⧇ āĻāχ āĻĢāĻžāĻ‚āĻļāύ āĻŦā§āϝāĻŦāĻšāĻžāϰ āĻ•āϰ⧁āύāĨ¤

Error codes:

5 Invalid procedure call

Example:


Sub ExampleSpaces
Dim sText2 As String,sText As String,sOut As String
    sText2 = " <*Las Vegas*> "
    sOut = "'"+sText2 +"'"+ Chr(13)
    sText = Ltrim(sText2) ' sText = "<*Las Vegas*> "
    sOut = sOut + "'"+sText +"'" + Chr(13)
    sText = Rtrim(sText2) ' sText = " <*Las Vegas*>"
    sOut = sOut +"'"+ sText +"'" + Chr(13)
    sText = Trim(sText2) ' sText = "<*Las Vegas*>"
    sOut = sOut +"'"+ sText +"'"
    MsgBox sOut
End Sub

Please support us!