stirlingmw
Board Regular
- Joined
- Feb 18, 2013
- Messages
- 75
I have a Userform which I can pass data from one ListBox to another. This works well with one list of data that is to be transferred over. However, i need to add another column of data.
I have 2 Listboxes "Role" and "Name" which now should make up a list item to be passed into a third listbox "Owner". Both items should then be removed from their original listboxes so that they cannot be selected again.
the code i am currently using to transfer data in one column is as follows:
Can this be modified so that Listbox2 will contain an additional Column to include "ListRole"?
Thanks
Steve
I have 2 Listboxes "Role" and "Name" which now should make up a list item to be passed into a third listbox "Owner". Both items should then be removed from their original listboxes so that they cannot be selected again.
the code i am currently using to transfer data in one column is as follows:
Code:
Private Sub BTN_MoveSelectedRight_Click()
Dim iCtr As Long
For iCtr = 0 To Me.ListName.ListCount - 1
If Me.ListName.Selected(iCtr) = True Then
Me.ListBox2.AddItem Me.ListName.List(iCtr)
End If
Next iCtr
For iCtr = Me.ListName.ListCount - 1 To 0 Step -1
If Me.ListName.Selected(iCtr) = True Then
Me.ListName.RemoveItem iCtr
End If
Next iCtr
End Sub
Can this be modified so that Listbox2 will contain an additional Column to include "ListRole"?
Thanks
Steve