val = Dialog(DialogName).WinComboBox(ComboBoxName).GetVisibleText
Num = Dialog(DialogName).WinComboBox(ComboBoxName).GetItemsCount
For i = 0 to Num-1
selectitem = Dialog(DialogName).WinComboBox(ComboBoxName).GetItem(i)
Pos = Instr(1, val,selectitem)
If Pos <> 0 Then
On Error Resume Next
Dialog(DialogName).WinComboBox(ComboBoxName).Select
i
End If
val = Dialog(DialogName).WinComboBox(ComboBoxName).GetVisibleText
Next
checkval = "Local"
For i = 1 to 2
selectitem = Dialog(DialogName).WinComboBox(ComboBoxName).GetItem(i)
Pos = Instr(1, checkval,selectitem)
If Pos <> 0 Then
On Error Resume Next
Dialog(DialogName).WinComboBox(ComboBoxName).Select
i
End If
Next
No comments:
Post a Comment