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

Can any one provide code for Mid(string,start[,length]). I have been asked to write code for Mid(). i.e We need to define our own function say MyMid() which should behave same like built-in Mid function

1921


did any one attended interview in applabs if you had gone through plz tell me the procedure

1863


What is the output of a + b in vbscript if a = 5 and b = 10?

2130


Explain vbscript in detail?

617


Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder

1577






Write a code to print numbers from 5 to 0?

677


How to pass argument by reference to a function in vbscript?

540


How you can call vbscript functions?

581


How to write VB script for login module?

2678


What is the difference between vbscript and vba?

607


What is the difference between VBScript and JavaScript?

2070


Which operator can be used to do an xor operation in vbscript?

684


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

610


Explain about operator precedence in vb script?

579


What is byref and byval parameters in vbscript?

609