Method: Trim for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Trim for VBS
Method: Trim for VBS
Deletes leading or trailing blanks in a text.
vTrim = Object.Trim(string)
| Object | VBS Object with this method. You do not need to specify this object. |
| string | Variant Specifies any text. |
| vTrim | Variant Receives a text without leading or trailing blanks. |
The following example deletes leading and trailing blanks in a text:
Dim MyString MyString = Trim(" DIAdem ") Call MsgBox(MyString) ' Returns "DIAdem"