Results 1 to 2 of 2

Thread: drag and drop files

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2009
    Posts
    233

    Question drag and drop files

    Drag and drop files to a form, then copy the files to a particular location, example to another pc on a network? any ideas?

    or i'll re-phrase my question..drag and drop to transfer files
    any help is greatly appreciated..

    thanks...
    Last edited by JJJCR_FOX; Mar 9th, 2009 at 03:22 AM.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: drag and drop files

    vb Code:
    1. Private Sub Form_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    2. openfile Data.Files(1)
    3. End Sub
    i used this to open the content of the dropped file into a textbox, just change the code to do whatever you want with the files, looping through the array
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

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