View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams[_4_] Tim Williams[_4_] is offline
external usenet poster
 
Posts: 114
Default Shared folder changed path - sometimes S://SharedFolder sometimes T://SharedFolder

On Jan 30, 4:12*pm, GS wrote:
Tim Williams wrote on 1/30/2012 :





On Jan 29, 9:13*am, GS wrote:
<FYI
What I've learned is that VB[A] can't work with 'mapped' drives on a
network because those are for use by the system only. What the system
does is to create a 'virtual namespace' as a 'pointer' to the actual
location on the network. In this case it's been easier to prompt the
user via the folder picker dialog when the stored path throws an error..


VBA *can* work fine with mapped drives, as long as the drive letter is
consistent.


If each user has a different drive letter mapped, then the UNC path
should be used instead.


Tim


--
Garry


Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc- Hide quoted text -


- Show quoted text -


Tim,
My mistake! I meant to ref 'mapped folders' in context. My experience
with *directly* referring to folders 'mapped' to UNC drives is that
they return the redirect folder NOT the UNC folder. Same behavior
occurs with drives since both are 'paths' to somewhere. If I'm wrong
I'd be happy to test any code you offer that shows otherwise. AFAIK,
anything other than an absolute path will not work in any programming
language when working with UNC paths over a network.

--
Garry


If I map a local drive Z to \\someserver\somefolder I can do this:

Debug.Print Dir("Z:\")

or this:

Debug.Print Dir("\\someserver\somefolder\")

and I get the same result. Maybe we're talking at cross-purposes here
- do you have an example which doesn't work like this?

Tim