Method: LeftB for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: LeftB for VBS
Method: LeftB for VBS
Returns a certain number of bytes from the first character of a text onwards.
vLeftB = Object.LeftB(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 bytes to be returned. |
| vLeftB | Variant Receives the returned text. |
The following example returns the first six bytes of the text DIAdem.
Dim MyString MyString = LeftB("DIAdem", 6) Call MsgBox(MyString) ' Returns "DIA"