Posted by Mohammad Rahhal, Last modified by Salameh Abu Hashish on 21 December 2018 01:13 PM


Public Function MidString(stringVar As String, start As Long, Optional lengthVar As Integer) As String

This function is used to return a string containing a specified number of characters from a string.


Key Description
stringVar String expression from which characters are returned.
start Starting position of characters to returned, value of type long
lengthVar Number of character to returned , Optional value of type Integer 

Return value

Returns string a value which containing the number of characters in the string we entered.


Error number Condition
5 Start <= 0 or lengthVar <0



Public Sub main()

Dim Str 

Dim Result 

str= "VertexFX"

Result = MidString(str,2,3)

AlertMessage(Result)' it will return ert

End Sub

See Also

Back to VTL Client Script Index

(1 vote(s))
Not helpful

Comments (0)
Post a new comment
Full Name:
CAPTCHA Verification 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).

Help Desk Software by Hybrid Solutions