Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List Box Additem

Status
Not open for further replies.

azamatali

Programmer
Aug 20, 2001
50
IN
hi folks,
I am having a list which has items in the sorted order..
Now when i am adding an item to the list i want the item, that has been recently added should be selected in the list and should be highlighted..
How can i accomplish this....
Thanks in Advance.......
 
Hi,
try this please

If Text1 <> &quot;&quot; Then
lisVullen.AddItem Text1
End If
lisVullen.Text = Text1
lisVullen.SetFocus

Good luck
 

Use List1.selected to set which item(s) that are selected (and thereby highlighted). E.g. List1.Selected(2) = True
Sunaj
'The gap between theory and practice is not as wide in theory as it is in practice'
 
Otay....
List1.AddItem &quot;X&quot;
List1.ListIndex = List1.NewIndex
Tim

Remember the KISS principle:
Keep It Simple, Stupid! :cool:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top