PDA

View Full Version : VBA Macro Code to Enter Intranet's Login/Pass?



zima8172
07-24-2008, 06:58 AM
Hello. I have an Excel macro which opens the Excel files, refreshes all contents, saves and closes them. When I launch the macro, the following prompt appears once:

Connect to Intranet
User name
Password

Remember my password

OK Cancel


How do I mimic the login or password entry in VBA to eliminate the need to interact with the prompt?

Thanks

PS: Below is a small fragment of the macro. The prompt starts when the macro tries to access the intranet file.

Application.WindowState = xlMinimized
Workbooks.Open Filename:= "intranet address"
ActiveWorkbook.RefreshAll
ActiveWorkbook.Save
ActiveWorkbook.Close

mdmackillop
07-24-2008, 03:48 PM
Does this (http://www.vbaexpress.com/kb/getarticle.php?kb_id=973) help?