DIAdem Help

Method: Trim for VBS

  • Updated2024-09-12
  • 1 minute(s) read

Method: Trim for VBS

Deletes leading or trailing blanks in a text.

vTrim = Object.Trim(string)
ObjectVBS
Object with this method. You do not need to specify this object.
stringVariant
Specifies any text.
vTrimVariant
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"

See Also

Objects Overview

Related Topics

Filter | InStr | InStrB | InStrRev | Join | LCase | Left | LeftB | Len | LenB | LTrim | Mid | MidB | Replace | Right | RightB | RTrim | Space | Split | StrComp | String | StrReverse | Trim | UCase