Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I track changes made to a shared file per userid. Julie _at_GBS Excel Discussion (Misc queries) 4 May 3rd 05 01:52 PM
Scripting.FileSystemObject LAN Mirom Excel Programming 0 January 3rd 04 06:30 AM
Looking for Excel function to resolve userid to fullname. steve Excel Programming 0 September 17th 03 07:37 PM
Help with FileSystemObject? Ed[_9_] Excel Programming 2 August 5th 03 12:08 AM
FileSystemObject question Tod Excel Programming 3 August 2nd 03 06:08 PM


All times are GMT +1. The time now is 06:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"