Method: Left for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Left for VBS
Method: Left for VBS
Returns a certain number of characters from the first character of a text onwards.
vLeft = Object.Left(string, length)
| Object | VBS Object with this method. You do not need to specify this object. |
| string | Variant Specifies the text. |
| length | Variant Specifies the number of characters to return. |
| vLeft | Variant Receives the returned text. |
The following example returns the first three characters of the text DIAdem.
Dim MyString MyString = Left("DIAdem", 3) Call MsgBox(MyString) ' Returns "DIA"