Returns a specified number of characters from a string.
Mid(string, start[, length])
To determine the number of characters in string, use the Len function.
The following example uses the Mid function to return six characters, beginning with the fourth character, in a string:
Dim MyVar MyVar =Mid(
"VB Script is fun!",
4,
6)
' MyVar contains "Script".
Note The MidB function is used with byte data contained in a string. Instead of specifying the number of characters, the arguments specify numbers of bytes.
Left Function | Len Function | LTrim, RTrim, and Trim Functions | Right Function