Posted on January 5, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
| 'Controls - How to Drag/drop files from explorer to a listbox
Private Sub Form_Load()
List1.OLEDropMode = vbOLEDropManual
End Sub
Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, _
Shift As Integer, X As Single, Y As Single)
Dim I As Long
For I = 1 To Data.Files.Count
List1.AddItem Data.Files(I)
Next I
End Sub |