Forum Discussion
irina_lukina
14 years agoSuper Contributor
Hi Anusha,
I used the following code for this purpose:
Sub Test1
Dim ReqValues(3)
ReqValues(0) = "Item1"
ReqValues(1) = "Item2"
ReqValues(2) = "Item3"
Set Control = <DX_ComboBox_Object>
Num = Control.wItemCount
k = 0
For i = 0 to Num - 1
Item = Control.wItem(i)
For j = 0 to 2
If ReqValues(j) = Item Then
k = k + 1
End If
Next
Next
If k = 3 Then ' <- Here, 3 is the size of the ReqValues array
Log.Message("The combo box contains all the required values")
Else
Log.Message("The combo box doesn't contain all the required values")
End If
End Sub
Maybe there is a simpler approach, but I don't know it.
I hope this helps :)