Finding Files Using VBA

manrav

New Member
Joined
Aug 19, 2002
Messages
14
Is there a way to find out which drive and directory a particular file is in. I would like to be able to do this through VBA. All I need is to be able to capture the drive letter and the folder that a particular file is in and save it.
Any Ideas.....?
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Thanks Paddy,
But how do I get it to search for the file using multiple drives. Can I search for the file in drives c:,D,and F at the same time?

Also I don't need to open the file I just need to be able to store the Drive Letter and path as string.

Any Help Greatly appreciated..
Thanks..
 
Upvote 0

Forum statistics

Threads
1,215,641
Messages
6,125,986
Members
449,276
Latest member
surendra75

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