I am trying to enter a Username into a text box Using getElementById. this generates an "Object required" Error
Dim Myid
Mypsw As String
Dim ie As InternetExplorer
Dim ErrCnt
On Error GoTo ErrorHandler
ChDir "C:\Users\hm_cl\Downloads"
Kill "History.txt"
Myid = "hmclark1959"
Mypsw = "xxxxxxxxx"
Set ie = New InternetExplorer
ie.Visible = True
ie.navigate "https://eteller.dakotalandfcu.com/Centryx/servlet/com.sos.webteller.accountaccess.LoginFrame"
While ie.Busy = True Or ie.readyState < 4: DoEvents: Wend
' ******** The following line generates the error
ie.document.getElementById("LoginID").Value = Myid
ErrorHandler:
MsgBox (Err.Description)
Select Case Err.Number
Case 53 ' File not found
Resume Next
Case 424 ' Object Reuired
ErrCnt = ErrCnt + 1
If ErrCnt > 4 Then
MsgBox (" Unknown Server Side Error")
ie.Quit
End
Else
Application.Wait (Now + TimeValue("0:00:10"))
Resume
End If
Case Else 'Unknown error
MsgBox ("There is an unhandled error")
ie.Quit
End
End Select
When I click inspect element on the textbox it says the ID="LoginID"