View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Logging to a network folder with username/password

Why not just use the UNC path instead of the mapped drive?


Teddy wrote:

Hi group

I want to check a remote network folder using "dir"

If dir(REMOTE_HOME, vbDirectory) = "" Then
MkDir (REMOTE_HOME)
End If
after this I want to place a file in the folder...

I works if I have mapped up the server in explorer.

If I don't have the mapped drive dir(REMOTE_HOME,vbDirectory) fails
with error 52
"Bad file name..."

How do I temporary connect to the server and placing the file in the
folder?

Thanks


--

Dave Peterson