Solved

How do I copy the selected items from one listbox to another?

Posted on 2006-07-19
2
173 Views
Last Modified: 2006-11-18
I have two listboxes.  I want the selected items in the first box to be copied to the second box on a button click event.

The listbox names are lbFiles and lbDelete.  I want lbFiles to copy to lbDelete.


Private Sub btnRight_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRight.Click
        lbDelete = lbFiles.SelectedItems
End Sub
0
Comment
Question by:scross1276
2 Comments
 
LVL 5

Accepted Solution

by:
nickhoggard earned 500 total points
ID: 17140919
Hi,

Try this

        For Each objItem As Object In lbFiles.SelectedItems
            lbDelete.Items.Add(objItem)
        Next

Cheers

Nick
0
 

Author Comment

by:scross1276
ID: 17140957
Worked great man, thanks!!!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now