Results 1 to 2 of 2

Thread: Urgent help. How to get multiple ole drag and dropped items into listbox

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2007
    Location
    Ghana
    Posts
    120

    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.

  2. #2
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    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
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width