I have an existing macro that opens up an URL in IE, enters my user ID, password and submit before doing few other tasks. Off late, I am frequently getting a pop-up window asking for my Windows credentials before the URL is opened. My macro stops working when the popup prompt is displayed.
- Cannot reduce security level of IE.
- Pop up title is “Windows Security”. I am not sure when this one fires so cannot use SendKeys since if this popup is not active, SendKeys enters Windows credentials in the URL that opens up.
- I tried to capture all IE open windows (using ShellWindows) to identify popup window title but this popup doesn’t show in list of open windows
- This popup doesn’t show up in task manager.
- IE ReadyState is in READYSTATE_LOADING when this popup opens. I can make the code wait for few seconds, if it is still in loading status, then I can use SendKeys but I am keeping that as last option as IE could be in that status because of network speed and don’t want to keep that waiting time for long.
The question, is there a way to identify if Windows Security popup is fired and active? How to capture that instance through VBA? Is there any other way I can automate entering my Windows credentials in this prompt? These won’t normally change for few months so I am fine to hard code them in Excel declarations.
I use Excel 2010 with Windows 7 SP1 OS.
My code looks something like below.
Thanks for your time and help.Please Login or Register to view this content.
Bookmarks