09-09-2009, 02:40 PM
You can try this
I am assuming you have values in the text file in the form "Val1,Val2,.."
let me know if it works..
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..