A more glamourous solution, useful if you want to use a listview, which is prettier!:
Copy this code I quickly knocked up into a form.
On the Form place two listviews and a command button.
Set the listviews to multiselect = true
set the view on each listview to lvwList
Then run and listview1 can move to listview2 etc.
If you have another button but swap source and target listviews round then you can move the items back and forth.
Notice i copy the contents that aren't selected to one array and the selected items to another array. If you need to keep sub items then do it on the populate part where i just copy the text at the mo, make sure you do this before clearing the source listview!!!
Martin
Option Explicit
Option Compare Binary
Private Function MoveSelectedToListView(ByVal lvwSource As ComctlLib.ListView, _
ByVal lvwTarget As ComctlLib.ListView, _
Optional ByVal RemoveSource As Boolean = True)
Dim li As ListItem
Dim i As Integer
Dim iTo As Integer
Dim iFrom As Integer
Dim arrFrom() As String
Dim arrTo() As String
Dim bItemsToMove As Boolean
For Each li In lvwSource.ListItems
If li.Selected Then
'set my flag
bItemsToMove = True
'get all selected items into one array
ReDim Preserve arrTo(iTo + 1)
arrTo(iTo) = li.Text
iTo = iTo + 1
Else
'get all unselected into another array
ReDim Preserve arrFrom(iFrom + 1)
arrFrom(iFrom) = li.Text
iFrom = iFrom + 1
End If
Next li
'now clear the source list and put the unselected items back
If bItemsToMove Then
If RemoveSource = True Then
lvwSource.ListItems.Clear
For i = 0 To UBound(arrFrom) - 1
lvwSource.ListItems.Add , , arrFrom(i)
Next i
End If
'now populate the target listbox - don't clear because items may exist already
For i = 0 To UBound(arrTo) - 1
lvwTarget.ListItems.Add , , arrTo(i)
Next i
End If
Set li = Nothing
End Function
Private Sub Command1_Click()
MoveSelectedToListView ListView1, ListView2, True
End Sub
Private Sub Form_Load()
Dim i
For i = 1 To 10
ListView1.ListItems.Add , , "item" & CStr(i)
Next i
End Sub