mahmed1
Well-known Member
- Joined
- Mar 28, 2009
- Messages
- 2,302
- Office Version
- 365
- 2016
- Platform
- Windows
Hi All,
I am trying to copy a multi select (2 COLUMNS) selected item from 1 list box to another but im getting stuck. I can only seem to get the fisrt item
Ps.
List count startfrom 0
List index starts from 1
What just list start from i.e
listbox1.list(1) if i dont specify both arguments would that only pull through the 2nd item (1 column) as 1 in listindex referes to 1 where listcount referes to 0
Code:
I am trying to copy a multi select (2 COLUMNS) selected item from 1 list box to another but im getting stuck. I can only seem to get the fisrt item
Ps.
List count startfrom 0
List index starts from 1
What just list start from i.e
listbox1.list(1) if i dont specify both arguments would that only pull through the 2nd item (1 column) as 1 in listindex referes to 1 where listcount referes to 0
Code:
Code:
Private Sub cbofwd_Click()
Dim iCtr As Long
For iCtr = 0 To Me.lst1.ListCount - 1
If Me.lst1.Selected(iCtr) = True Then
Me.lst2.AddItem Me.lst1.List [B]????[/B]
End If
Next iCtr
For iCtr = Me.lst2.ListCount - 1 To 0 Step -1
If Me.lst2.Selected(iCtr) = True Then
Me.lst2.RemoveItem iCtr
End If
Next iCtr
End Sub