ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Logging to a network folder with username/password (https://www.excelbanter.com/excel-programming/394943-logging-network-folder-username-password.html)

Teddy[_3_]

Logging to a network folder with username/password
 
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

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


All times are GMT +1. The time now is 06:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com