Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Function Declaration
-
Function Mid(String As Variant, Start As Long, Optional Length As Variant) As Variant
Parameter |
Description |
---|---|
String |
String expression from which characters are returned. If String contains the data value Null, Null is returned. |
Start |
Long containing the character position in String at which the part to be taken begins. If Start is greater than the number of characters in String, Mid returns a zero-length string (""). |
Length |
Long containing the number of characters to return. If omitted or if there are fewer than Length characters in the text (including the character at start), all characters from the start position to the end of the string are returned. |
Runtime Semantics.
§ Returns a String containing a specified number of characters from a string.
§ To determine the number of characters in String, use the Len function.
§ Note: use the MidB function with byte data contained in a string, as in double-byte character set languages. Instead of specifying the number of characters, the arguments specify numbers of bytes.