we have one text box and one list box(list box appear in
same page or another page) what ever the text enter in text
box that must be displyed in list box as first one.
for example if we enter 10 in text box that is the 1st item
in list box . after that we enter 11 then 11 is the 1st item
and 10 is 2nd item. the maximum limit of list box is 10
items. if we enter 11th item the 10th item is deleted and
llth one is add as 1st one and 9th one goes to 10th position

Answer Posted / jagadesh

If Listbox.ListCount >= 10 Then
Listbox.RemoveItem Listbox.ListCount - 1
End If
Listbox.AddItem Textbox.Text, 0

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Could you please any one give code for the following ? Scenario : Suppose a excel file contains 10 records and earch have 5 fields. how can i input this excel file for datadrive wizard ? Please explain

1461


How to test background color and dynamic images during run time can you put the check point for moving objects?

1449


What is the recovery scenario in qtp?

572


what type of run time errors you get while you ar edoing rpg program?

1513


What is the file extension of the code file in qtp?

560






Your roles and responsibilities and daily tasks? (As automation tester)

2581


how to acess a test in RSA?

1671


we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?

1632


what is the difference between data driver & data driven and driver script?

2138


How you debug your script?

569


What is a data driven test in qtp?

585


Whether qtp 9.0 supports Test director8.0

2120


How do you create new test sets in td?

531


Have you used xml check point in your project? How?

549


Our company is having a windows client server application developed in vb.net. so there is a treeview and i am not in a position to record the click events in QTP. so kindly help. Vivek

1571