Vba drag and drop file
Viewed 32k times. Thanks for your time and consideration! Improve this question. MattB MattB 2, 5 5 gold badges 22 22 silver badges 46 46 bronze badges. Found an answer and answered my own question Mr. Downboats, whoever you are.
Add a comment. Active Oldest Votes. Improve this answer. I don't understand why someone would give you a negative point JoannaMikalai I haven't actually done it with multiple files, but I assume it is possible.
I'll give you my best guess. The DragDrop event produces the data. That's why I use Data. Files 1 to get the file name. I haven't tested this so I can't promise anything, but I would assume that you could iterate over the Data. Files 1 to n array to get multiple file paths. Files intCOunter. Should work. Can anyone point me in the right direction on what control I might be able to use that will allow an Access form to recognize that a file is being dropped into it, 'take control' of the file and kick off the appropriate VBA to save the file out to where I need it stored?
Secondly, once I have this down I'd like to know how to have a link to the file auto populated in a field of that same form. Thanks in advance-. Excel Facts. Who is Mr Spreadsheet? Click here to reveal answer. I guess this is a step in the right direction does anyone have any feedback?
Assert False 'Need to setup this function as another Case. End Select End Sub. Last edited: Aug 10, I was able to get that to recognize that I was dragging and dropping a file But it locks up inadvertently so I am back to sqaure one, anyone know how to let Access recognize that I am dropping a file into it? Bump, any ideas? I would really like to be able to drag and drop a file into a part of my form and have code that would save the file out to network drive Joined Aug 6, Messages Sorry for bumping an old topic, but I have also been looking to do the same procedure.
Thanks in advance for any ideas! Joined Jan 4, Messages 5. Hello, I am also looking to do exactly this. I am trying to build a document management system which is lightweight and intuitive to use. I then want to use Access to store meta-data about each file, in a similar way to how MP3's are tagged with data. I want to remove the burden of thinking about filing from the engineer. Edit: Forgot that you need to initialize the Application Events by posting the below code in any module.
Tags: excelexcel , file , vba. May 14, excel Leave a comment. Questions: I have the following code that copies a Master worksheet and renames it using Application. Questions: Could someone please help me out?
It ha Worksheets "Target". Sheets "Target". Activate WbCib. I think I need to loop it. Files 1 Workbooks Wb. Improve this question. Community Bot 1 1 1 silver badge. Jeanjean Jeanjean 2 2 gold badges 8 8 silver badges 22 22 bronze badges. Have you tried using a foreach loop.
Drag and drop onto a userform? Learned something new today. Roe Thanks for your answer. I think I've managed to do it with a for each.
0コメント