Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
FileSystemObject CopyFile with UserID/Password
I have a shared folder mapped on my computer. Access to
the shared folder requires an UserID/Password. I have this code that will copy a file from my computer to the shared folder. My objective is to have the code run when I am not logged in. Sub CopyUpdateToFolder() Dim filesys Set filesys = CreateObject("Scripting.FileSystemObject") If filesys.FileExists("C:\View\Sample Report.xls") Then filesys.CopyFile "C:\View\Sample Report.xls", "\\OtherServer\View\Sample Report.xls" End If End Sub As long as I'm sitting here logged in to my computer and to the shared folder, this code works. However when I am not logged in, the code is going to fail because it does not supply the UserID/Password for the shared folder. How do I pass this information in the code. Thanx, tod |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I track changes made to a shared file per userid. | Excel Discussion (Misc queries) | |||
Scripting.FileSystemObject LAN | Excel Programming | |||
Looking for Excel function to resolve userid to fullname. | Excel Programming | |||
Help with FileSystemObject? | Excel Programming | |||
FileSystemObject question | Excel Programming |