27 Nov 2012

Vb Script BuiltIn Functions with Example


How to Check whether the string contains particular word or not using vb script function

Instr function:

Returns the position of the first occurrence of one string within another

Syntax: InStr([start,   ]String1,String2[,  Compare])

var="I am venkat kandula working with qtp"

If InStr(1,var,venkat) Then
msgbox "exists"
Else
msgbox "not Exists"

Redim Statement

The Redim statement is used  to change the array size within the script, for example... if we have 

declared an array 

Dim Customer(30)

but after that we want to change the size of the array, we can do it with the help of Redim statement

Like Redim Customer(50)


No comments:

Post a Comment