Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'add the "Microsoft Internet Controls" reference in your VBA Project indirectly
- Set ie = CreateObject("InternetExplorer.Application")
- With ie
- .Visible = True
- .navigate ("https://online.nationalgridus.com/login/LoginActivate?applicurl=aHR0cHM6Ly9vbmxpbmUubmF0aW9uYWxncmlkdXMuY29tL2VzZXJ2aWNlX2VudQ==&auth_method=0")
- While ie.ReadyState <> 4
- DoEvents
- Wend
- Set username = .document.getElementById("uid") 'id of the username control (HTML Control)
- Set pwd = .document.getElementById("response") 'id of the password control (HTML Control)
- Set button = .document.getElementById("Submit") 'id of the button control (HTML Control)
- username.Value = "MasterAccountName1234"
- pwd.Value = "MasterAccountPassword1234"
- button.Click
- While ie.ReadyState <> 4
- DoEvents
- Wend
- End With
- Set ie = Nothing
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement