Hello everyone!
I am wondering how I would transfer items from one listbox to another. Both these listboxes are multicolumn and I need to transfer information from both those columns to the other two columns.

Here is my code so far:

Private Sub cmdAdd_Click()
'******************************************************
Dim intPosition%
Dim strTransfer$, strTransfer2$
'******************************************************

'looks to see what was selected
For intPosition = 0 To lstStudents.ListCount - 1
    If lstStudents.Selected(intPosition) = True Then
        'it was selected
        Exit For
    End If
Next intPosition

'takes what was selected and transfers it over
strTransfer = lstStudents.Column(0, intPosition)
strTransfer2 = lstStudents.Column(1, intPosition)

'adds it over
lstRoster.AddItem (strTransfer & strTransfer2)
End Sub

Thanks for the help!

Attached is a sample of ALL listbox functions. At the bottom right you will find listbox copy including multiple coloumns. You obviously have to change the sample to suit your needs. This was obtained a while ago from vbfx.com

I hope this helps to solve your problem AND to add some more features regarding list boxes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.