08-13-2008, 06:50 PM
I have created a function for string comaprison in .vbs file
The function looks like this and i am getting the return value
Now i call this function in QTP
here x should display the return value from the function
When i run this function in qtp, i get the following error message- Type msimatch StringCom
Can anybody please provide the right code
The function looks like this and i am getting the return value
Code:
Public function StringCom(x1,x2)
Dim getvalue
getvalue =StrComp(x1,x2,compare)
StringCom =getvalue
End function
Now i call this function in QTP
Code:
dim x
x1 = "abc"
x2 = "abcdef"
x =Call StringCom (x1, x2)
msgbox x
here x should display the return value from the function
When i run this function in qtp, i get the following error message- Type msimatch StringCom
Can anybody please provide the right code