VBA LTrim Function: The LTrim function in VBA removes the leading spaces from a supplied text string.

Syntax

Parameter

String (required) – This parameter represents he text string that you want to remove the leading spaces from.

Return

This parameter returns a string after removing the leading spaces.

Example 1

Output

Name : Joe Jonas Address: Street   34 Manhattan, US  
VBA LTrim Function

Example 2

Output

Enter your first name and click on OK

VBA LTrim Function

Enter your last name. Click on Ok

VBA LTrim Function

A MsgBox will pop up displaying your email id

VBA LTrim Function

Pin It on Pinterest

Share This