![]() |
Novell server full path names of VBA references
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 |
Novell server full path names of VBA references
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? "Nicholas Dreyer" wrote: 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 |
Novell server full path names of VBA references
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. |\|. On Sun, 22 Oct 2006 10:21:01 -0700, JLatham <HelpFrom @ Jlathamsite.com.(removethis) wrote: 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? |
Novell server full path names of VBA references
Nicholas,
With the help of the Windows API, you should be able to determine such info. e.g. http://vbnet.mvps.org/code/network/u...appeddrive.htm + the other UNC/mapped drive, shared resources routines etc. NickHK "Nicholas Dreyer" wrote in message ... 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. |\|. On Sun, 22 Oct 2006 10:21:01 -0700, JLatham <HelpFrom @ Jlathamsite.com.(removethis) wrote: 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? |
Novell server full path names of VBA references
Can you key upon whether the path name has a colon in it?
|
Novell server full path names of VBA references
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 On 22 Oct 2006 23:18:20 -0700, wrote: Can you key upon whether the path name has a colon in it? |
Novell server full path names of VBA references
Thanks a-bunch. It looks like you have answered my conundrum! I will
give the code on that web site a try. Nick On Mon, 23 Oct 2006 11:29:09 +0800, "NickHK" wrote: Nicholas, With the help of the Windows API, you should be able to determine such info. e.g. http://vbnet.mvps.org/code/network/u...appeddrive.htm + the other UNC/mapped drive, shared resources routines etc. NickHK "Nicholas Dreyer" wrote in message ... 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. |\|. On Sun, 22 Oct 2006 10:21:01 -0700, JLatham <HelpFrom @ Jlathamsite.com.(removethis) wrote: 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? |
Novell server full path names of VBA references
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 On Mon, 23 Oct 2006 11:29:09 +0800, "NickHK" wrote: Nicholas, With the help of the Windows API, you should be able to determine such info. e.g. http://vbnet.mvps.org/code/network/u...appeddrive.htm + the other UNC/mapped drive, shared resources routines etc. NickHK "Nicholas Dreyer" wrote in message ... 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. |\|. On Sun, 22 Oct 2006 10:21:01 -0700, JLatham <HelpFrom @ Jlathamsite.com.(removethis) wrote: 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? |
Novell server full path names of VBA references
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 (UNCmapped drive), but you can always go the other way (mapped driveUNC). 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 "Nicholas Dreyer" wrote in message ... 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 On Mon, 23 Oct 2006 11:29:09 +0800, "NickHK" wrote: Nicholas, With the help of the Windows API, you should be able to determine such info. e.g. http://vbnet.mvps.org/code/network/u...appeddrive.htm + the other UNC/mapped drive, shared resources routines etc. NickHK "Nicholas Dreyer" wrote in message ... 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. |\|. On Sun, 22 Oct 2006 10:21:01 -0700, JLatham <HelpFrom @ Jlathamsite.com.(removethis) wrote: 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? |
All times are GMT +1. The time now is 10:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com