Okay, so I realized today that the code I worked out doesn't work for what I need to do. I need to be able to copy the selected item from Box 1 to Box 2. I want the user to be able to select multiple items at one time. Right now, if I try to call the .Value property of the listbox while it's MultiSelect property is set to fmMultiSelectMulti, it returns errors. It only works if I set it to single.
Here's what I have right now:
Dim i As Variant
If TListBox2.ListIndex = -1 Then Exit Sub
For i = 0 To List2.ListCount - 1
If TListBox2.Value = List2.List(i) Then
Beep
Exit Sub
End If
Next i
List2.AddItem TListBox2.Value
I tried to replace "value" with Selected(0) but it doesn't seem to work... Any ideas?