| || |
Check if Value is contained in an object Property
I need to compare if a variable value is contained in an object Caption.
For example I have the variable "Test" with the values "QWERTY" and I need to find this value in the object Caption (QWERTYUIOP)so I need to ignore everything after QWERTY.
I tried to use a Test Logic Designer - Verification, but the Expected value donīt allow to use variables or expressions and *.
How can I perform this using Visual Test? Is it possible?
Re: Check if Value is contained in an object Property
"Test" with the values "QWERTY" and I need to find this value in the object Caption (QWERTYUIOP)s
You can use INSTR function to check this.
Test = "QWERTY"
InString = "QWERTYUIOP"
StrFound = InStr(InString, Test)
If StrFound > 0 Then
MsgBox "String found"
StrFound variable will give you the position from which the string was found. If it is greater than 0 then there is a match. Other if it is 0 than there is no matching string.