Novell server full path names of VBA references

N

Nicholas Dreyer

On my system at work, Novell server folder name:
\\LC30\VOL1\USERS\ResearchandDevelopment
maps to Windows full path name H:\ResearchandDevelopment

If I open excel workbook library.xls located in this folder from the
excel file/open menu, and look at VBA expression
Workbooks("application.xls).path I see the windows path name
H:\ResearchandDevelopment.

If library.xls is openend automatically through a VBA refernce to it
in another workbook that is opened, Workbooks("application.xls").path
contains the Novell path name \\LC30\VOL1\USERS\ResearchandDevelopment

Is there a way towhich naming convention is used? It is very
difficult to write code to manipulate files when two completely
different looking paths can refer to the same location.

Thanks for any tips.

Nick
 
G

Guest

Don't let the system confuse you too much. I don't think there's a way to
force one or the other types of addressing. It is kind of determined by how
you got to the file to begin with. If you went through My Network Places to
open a file to begin with, then even the library.xls file would show the
network/Novell path. That is actually a safer, better way to do things when
you may distribute the Excel file to others unless you can guarantee that all
users will have network locations mapped in exactly the same way.

On the other hand, on any given machine, when you open the file, any path or
name that it hands you will work during that session with the file.

Does that help any?
 
N

Nicholas Dreyer

Thanks, what you say is interesting, but it just confirms that it is
difficult, if not impossible to have VBA code know if a file is
located where you want it to be, if two different root folder names
can refer to the same place.

|\|.
 
N

Nicholas Dreyer

Sure, but all that does is tell you which *form* of the root you have.
It would not tell you how to identify a Windows drive with a Novell
server path.

Thanks, Nick
 
N

Nicholas Dreyer

Thanks a-bunch. It looks like you have answered my conundrum! I will
give the code on that web site a try.

Nick
 
N

Nicholas Dreyer

This works great! It lets you determine a unique server path from any
drive letter.

One thing that is a little unclear though: I'd really like to reduce
everything to driveletter mappings (it's clearer for my users), so is
there an easy way to convert a UNC path to its drive letter? I did
not see such a routine listed, though I could probably patch it
together by looping through the WNetEnumResource output, but I'd
rather not reinvent that wheel, if someone already has done it.

Thanks again for any tips. Nick
 
N

NickHK

Nicholas,
I suppose the Enum way is the standard way to achieve this, as the server
will not know how/where its shares are mapped to (UNC>mapped drive), but you
can always go the other way (mapped drive>UNC).
Unless I read it wrong, the OP seems to have an unwated solution to your
situation in "Leading zero in hyperlink TextToDisplay", today, this NG; UNC
path get automatically changed to the locally mapped drives.

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top