tyler56895
New Member
- Joined
- Jul 28, 2020
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Its fairly clear I have no idea what I'm doing!
With previous help, I've managed to get the Username and Date of Birth fields to populate, but not matter what I try I cant get the Continue button to click. Worryingly, I've got another field to populate once i get the Continue button pressed! To not confuse the issue, I've removed all the attempts to hit the continue button from the code.
With previous help, I've managed to get the Username and Date of Birth fields to populate, but not matter what I try I cant get the Continue button to click. Worryingly, I've got another field to populate once i get the Continue button pressed! To not confuse the issue, I've removed all the attempts to hit the continue button from the code.
VBA Code:
Sub HL()
Dim HTMLDoc As HTMLDocument
Dim MyBrowser As InternetExplorer
Dim MyHTML_Element As IHTMLElement
Dim MyURL As String
MyURL = "https://online.hl.co.uk/my-accounts/login-step-one"
Set MyBrowser = New InternetExplorer
MyBrowser.Silent = True
MyBrowser.navigate MyURL
MyBrowser.Visible = True
Do
Loop Until MyBrowser.readyState = READYSTATE_COMPLETE
Set HTMLDoc = MyBrowser.document
HTMLDoc.all.UserName.Value = "myusername"
HTMLDoc.all.Item("date-of-birth").Value = "010101"
End Sub