Hello
**Confused**
I have 2 multiple column listbox's (listbox1 & 2). I am using a select/drag/drop function to move from listbox 1 to 2. I am attempting to move the selected line (3 columns) of the listbox. Both are set to 3 colums. How do I grab all three columns?
VB Code:
Private Sub ListBox2_BeforeDropOrPaste(ByVal Cancel As _ MSForms.ReturnBoolean, _ ByVal Action As Long, _ ByVal Data As MSForms.DataObject, _ ByVal X As Single, _ ByVal Y As Single, _ ByVal Effect As MSForms.ReturnEffect, _ ByVal Shift As Integer) Cancel = True Effect = fmDropEffectMove Dim I With ListBox1 For I = 0 To .ListCount - 1 If .Selected(I) Then ListBox2.AddItem .List(I) <----only 1st item? End If Next End With




Reply With Quote