Remove Leading And Trailing Spaces From A String
'Trim (MyString) will remove leading and trailing spaces in
MyString.
'LTrim (MyString) will remove only leading spaces in MyString.
'RTrim (MyString) will remove only trailing spaces in MyString
'For Example:
MyString = " MyText "
String1 = Trim(MyString) 'String1= "MyText".
String1 = LTrim(MyString) 'String1= "MyText
".
String1 = RTrim(MyString) 'String1= " MyText".