Urgent help. How to get multiple ole drag and dropped items into listbox
Hello everyone,
am able to get a the filename/path from an item i drop onto my list box using the code below. but unfortunately only one of the item is drop no matter the multiple selection of files i make say from the desktop or elsewhere.
dim str as string
str = data.item(1)
listbox1.additem str
I would be very grateful if anyone could show me how to get all the selected files into the listbox. Thank you.
Re: Urgent help. How to get multiple ole drag and dropped items into listbox
Ummm, the data object does not have an .Item property/method. Are you positive the code you posted is what you are using? Is this VB6?
In vb6, the code would look like this
Code:
Dim f As Long
If Data.GetFormat(vbCFFiles) Then
For f = 1 To Data.Files.Count
List1.AddItem Data.Files(f)
Next
End If