Monday, October 14, 2013

How to Login to a HTTPS Website PopUp using Excel VBA

Control Login Popup from Excel VBA 

The new HTTPS popups cause lot of irritation to the developers who have coded for it before.


I have tried to circumvent it using SendKeys. Please have a look at the snippet below and share your views on it



 
     Set ie = CreateObject("InternetExplorer.Application.1")
            ie.Visible = True
            ie.navigate cURL
             
             Application.Wait (Now + TimeValue("0:00:10"))
            If ie.readyState = READYSTATE_LOADING Then
         
              Set objShellWindows = New ShellWindows

            Application.SendKeys "abcd"
            Application.SendKeys "{TAB}"
            Application.SendKeys "pwd123"
            Application.SendKeys "{TAB}"
            Application.SendKeys "{RETURN}"
           
            End If
             
        'Do While ie.Busy: DoEvents: Loop
          Set doc = ie.Document

1 comment:

  1. Not sure if something's wrong, but this post (and many others) keeps popping up on my RSS feeds daily... Several times daily...

    ReplyDelete

StumbleUpon
Share on Facebook
Related Posts Plugin for WordPress, Blogger...
Download Windows Live Toolbar and personalize your Web experience! Add custom buttons to get the information you care about most.