Drag and Drop from Windows Explorer into Userform or Listbox

Fatchan

New Member
Joined
Aug 4, 2005
Messages
4
Hello,


I would like to create a macro that processes a bunch of excel files.

To determine which files should be processed, I want to create something like a listbox, into which I can drag files from windows explorer. When I am done adding the files I want to process, I want to iterate through the list of files and operate on them.

Can anyone provide me some help on how to write the code for the listbox?
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
I have found a relatively simple way to do this with a form in VB6, does anyone know a way to port from VB6 to VBA?
 
Upvote 0
I don't think this will be possible in VBA.

Why not just do the whole thing from VB6?

You can set a reference to the Excel library to access Excel objects/methods/properties.

Or how about using the GetOpenFileName method in VBA?
 
Upvote 0
Why not just do the whole thing from VB6?

You can set a reference to the Excel library to access Excel objects/methods/properties.

This would be an excellent way to do what I want, can someone show me what I need to do to reference the Excel Library?
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,300
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top