You can use the Mid function to copy a substring from the passed value.
Syntax | ||||
Mid(Value, Start [, Length]) | ||||
Return value | ||||
Type |
Description | |||
String |
The copied part of the string | |||
Parameter | ||||
Use |
Name |
Type |
Passing |
Description |
Required |
Value |
String |
ByVal |
Text |
Required |
Start |
Long |
ByVal |
Position >= 1 |
Optional |
Length |
Long |
ByVal |
Number of characters. |
The Start parameter specifies from which position the string should be copied out of Value. If Start is greater than the value passed in, an empty string is returned.
Without specifying Length, all characters are returned from start to end of the passed Value. By specifying Length, you can define the number of characters to return.