Method: Right for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Right for VBS
Method: Right for VBS
Returns a certain number of characters from the last character of a text backwards.
vRight = Object.Right(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. |
| vRight | Variant Receives the returned text. |
The following example returns the last three characters of the text DIAdem.
Dim MyString MyString = Right("DIAdem", 3) Call MsgBox(MyString) ' Returns "dem"