07-31-2015, 04:41 PM
Please try the below code. Here the oObjectRef is the string reference of the object (dropdown object), sVerifyListItem is the partial string that you want to check
Code:
Dim sStringExist, i, j, iMin, iMax, sActItemList
sItemArray = Split(sVerifyListItem," ")
iMinArray = LBound(sItemArray)
iMaxArray = UBound(sItemArray)
sStringExist = "N"
sItemCount = oObjectRef.GetROProperty("items count")
For i = 1 to sItemCount
sActItemList = oObjectRef.GetItem(i)
For j = iMinArray to iMaxArray
nPos = Instr(sActItemList,sItemArray(j))
If nPos>=1 Then
sStringExist = "Y"
Else
sStringExist = "N"
Exit For
End If
Next
If sStringExist = "Y" Then
oObjectRef.Select sActItemList
oObjectRef.FireEvent("onFocus")
Exit For
End If
Next