Mid                                                                                                            Function

MID(theString as String, start as Integer, num as Integer)

 

Description

Returns a substring from theString starting at start and continuing for num characters. If start is beyond the length of theString  then a null string results. If start + num is exceeds the length of theString, then the result will be the rightmost portion of theString, starting with the character at position start.

 

Example

Dim result as String

Result=Mid("John Doe", 3, 4) 'would set result to "hn D"