Advertisement
Guest User

Untitled

a guest
Nov 6th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Dim IEexp As InternetExplorer
  2. Set IEexp = New InternetExplorer
  3. IEexp.Visible = True
  4. IEexp.Navigate ("https://secure.edomero.defra.gov.uk/Default.aspx?Menu=Menu&Module=SecureHome")
  5. Do While IEexp.ReadyState <> 4: DoEvents: Loop
  6.  
  7. Application.Wait Now + #12:00:05 AM# 'added a wait to see if it loaded correctly
  8.  
  9. Dim inputElement As HTMLInputElement
  10. Set inputElement = IEexp.Document.getElementById("myHolder_Step2_txtUserName")
  11. inputElement.Value = "Username"
  12.  
  13. Set inputElement = IEexp.Document.getElementById("myHolder_Step2_txtPassword")
  14. inputElement.Value = "Password"
  15.  
  16.  
  17. Application.Wait Now + #12:00:05 AM# 'added a wait to see if it loaded correctly
  18.  
  19. IEexp.Document.getElementById("myHolder_Navigation_btnNext").Click
  20.  
  21.  
  22. Set IExp = Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement