Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to validate combobox values with testdata values
#2
Solved: 11 Years, 4 Months ago
You can try this
Code:
Set fso=createObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(YourFilePath, 1)
Dim strLine, arrLine, bMatch
if f.AtEndOfStream <> True
            strLine = f.ReadLine
            arrLine = split(strLine,",")
end if

val=window("").wincombobox("").getitemscount

bMatch = 0
for i= 0 to val-1
    d=window("").wincombobox("").getitem(i)
    if d = arrLine(i) Then bMatch = 1
Next

If bMatch = 1 then
    Msgbox "Compare - Failed"
Else
    Msgbox "Compare - Passed"
End if

I am assuming you have values in the text file in the form "Val1,Val2,.."
let me know if it works..

Reply


Messages In This Thread
RE: how to validate combobox values with testdata values - by Saket - 09-09-2009, 02:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Not able to get the list of items in Delphi Combobox Environment Object Raj Aryan Singh 3 2,291 02-04-2020, 12:32 AM
Last Post: Raj Aryan Singh
  Dynamic Values Identification PreethiJoshi 1 1,203 04-26-2018, 10:50 AM
Last Post: Ankur
  Need help for copying values from one excel to another excel vinodhiniqa 0 1,363 07-06-2017, 05:33 PM
Last Post: vinodhiniqa
  How import final calculated values by cell formula from Excel not the formula itself. qtped 1 4,854 01-17-2017, 04:05 PM
Last Post: sagar.raythatha
  Need to verify the drop down values based on condition santhoshmscsoftware 1 2,912 05-04-2016, 11:28 PM
Last Post: supputuri

Forum Jump:


Users browsing this thread: 2 Guest(s)