Plz give the vb script for the following scenerio.
In travel booking we have to select from delhi to mumbai
from the combobox The prices will be display in another
combo box .But i have to select the lowest price for it and
submit it

Answer Posted / satyanj

<Obj Hierch>.WinComboBox("From").Select "Delhi"
<Obj.Hier>.WinCombobox("TO").Select "Mumbai"
Itmscnt = <Obj.Hier>.WinComboBox("Price").GetItemsCount
val = <obj.Hier>.WinComboBox("Price").GetItem(0)
For itm = 1 to Itmscnt-1
itmval = <Obj.Hier>.WinComboBox
("Price").GetItem(itm)
If cint(Val) < cint(itmval) then
msgbox "Val is less than itmval"
else
val = itmval
end if
Next
msgbox "Lowest price is: "&val
<Obj.Hier>.WinComboBox("Price").Select val
<Obj.Hier>.WinButton("Submit").Click

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain sga memory structures?

566


Explain the adodb.stream class?

539


what is the differance between BYVAL,BYREF?

1762


Is VB Script Case sensitive or Case insensitive?

625


What is the use of option explicit statement?

573






How will you convert a string to lower case string using vbscript?

547


Explain about the asc function?

597


Explain about the support of asp for vb script functionality?

519


How to create a cookie using vbscript?

576


Mention how you can call vbscript functions?

570


How to capture a runtime error in vbscript?

621


Explain about the functionality of vb script?

563


How to open excel in vb script?

558


Explain the asc function?

501


What is loose binding? Why is it not a good practice to use it?

625