Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Log-In Credentials in a Macro
I have an excel macro that accesses files on another computer over the
network (workgroup). I have shared this folder however when I run the macro unless I access the other computer and enter the log in credentials. Is there a way to hard code the log in credentials into my code, so that it's not necessary to login if the computer is restarted or another account logs on? What I currently do now is goto Start=Run \\10.0.118.16 and enter the credentials before I run the macro. Below is a snap shot of the code that accesses the other computer Set Res = Range("A1") 'upper left corner of Result range Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.GetFolder("\\10.0.118.16\DataFiles\") Set fc = f.Files i = 0 With Res For Each fl In fc If UCase(Right(fl.Path, 4)) = ".TXT" Then Thanks Little Penny |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I pass the logon credentials in a macro to a ODBC query | Excel Programming | |||
Excel paste ask user credentials | Excel Discussion (Misc queries) | |||
Verifying your credentials for opening content with restricted pe. | Excel Discussion (Misc queries) | |||
Can a service account be embedded in Workbook so that by default the macros are run with service account credentials and not the user credentials??? | Excel Discussion (Misc queries) | |||
Using classes to store user credentials | Excel Programming |