I've used fso.FileExists(fullfilepath)
many times before, but always with mapped drive letters. I have the reference to Microsoft Scripting Runtime.
In my new situation, many people map the same drive letter to different paths, so I want to use the UNC path.
I keep getting If fso.FileExists(fullfilepath)
evaluating to false when I use the UNC path.
If I use the mapped drive letter that I personally use, it evaluates to true - the file IS there, and the path name hasn't changed.
I found some posts from people indicating they had problems when a folder in the path had spaces in the name, and the solution there was to wrap the fullfilepath variable in double-quotes, like
fullfilepath = Chr(34) & fullfilepath & Chr(34)
but that didn't work either.
I even pasted the paths in instead of using a variable.
This works:
fso.FileExists("S:\pathpart\file.csv")
This does not work:
fso.FileExists("\\\networklocation\pathpart\file.csv")
I tried adding the Microsoft Visual Basic for Applications Extensibility 5.3 reference, it didn't make a difference.
The file is not hidden or read-only.
I'm completely stumped.
Edited to add the path, for clarity:
\\corp\sites\abc2001\MIS\Company\Sterling Data\Investments\branch_referrals_13JUN15.csv_13062015.csv