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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listbox selection

Status
Not open for further replies.

domt

Programmer
Joined
Mar 13, 2001
Messages
115
Location
US
I have a Listbox (List1) with some items in it, and another, empty, Listbox (List2).
I would like to add the last item of List1 to List2, and then remove that item from List1, by clicking a command button.
Can anyone suggest coding to do this?
Dom
 

[tt]
List2.AddItem List1.List(List1.ListCount)
List1.RemoveItem List1.ListCount
[/tt]

or something like that

Good Luck

 
Thank you for your help.
Actually, List2.Additem List1.List(List1.ListCount-1) works.
Dom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top