Refer to network drive using network name instead of a mapped letter (eg "G:\")

Glory

Well-known Member
Joined
Mar 16, 2011
Messages
640
At my work, the people who set up the computers used a lot of different letters to map the network.

I've tried using the path " \\networkname\ " in place of a letter, with no luck.

Any ideas?
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Literally "file", or is "file" replaced with something else?

For the rest of the path, do I revert to using backslashes?

" file://network/folder1\folder2\file.xls "?
 
Upvote 0
Would you suggest that I loop through a series of possible letters to determine which has the network mapped to it?

The only thing is that there are several networks. It might not fail, but still not return the proper network. I guess I could go on error 1004 (or whatever the number is for an invalid path instead of an unfound file), but then I'm basically right back where I started.
 
Upvote 0
No, use the UNC naming convention instead, and don't worry about mapped drives:

fchDirUNC ("\\networkname\folder\")
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,671
Members
452,937
Latest member
Bhg1984

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