I have the following code which automate data entry in web page.
but unable to complete the codes due to an error. below is given the current codes and website element where error occurs.
Codes:
Sub automateIE()
Dim IE As Object
Dim URL As String
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.navigate "IIS Windows Server"
Do While IE.Busy
Application.Wait DateAdd("S", 1, Now)
Loop
Set doc = IE.document
IE.document.getelementbyid("userid").Value = "xxxxx"
IE.document.getelementbyid("password64").Value = "xxxxxx"
IE.document.getelementbyid("company_code").Value = "xxxx"
IE.document.getelementbyid("branch_code").Value = "xxx"
IE.document.getelementbyid("login1").Click
Do While IE.Busy
Application.Wait DateAdd("S", 1, Now)
Loop
Set doc = IE.document
IE.document.getelementbyid("236").Click
IE.document.getelementbyid("4916").Click
Do While IE.Busy
Application.Wait DateAdd("S", 1, Now)
Loop
Set doc = IE.document
IE.document.getelementbyid("template_id").Value = "2631" - here is the error comes
End Sub
Here is the HTML from web site
kindly help me to short this out Thanks.
but unable to complete the codes due to an error. below is given the current codes and website element where error occurs.
Codes:
Sub automateIE()
Dim IE As Object
Dim URL As String
Set IE = CreateObject("InternetExplorer.application")
IE.Visible = True
IE.navigate "IIS Windows Server"
Do While IE.Busy
Application.Wait DateAdd("S", 1, Now)
Loop
Set doc = IE.document
IE.document.getelementbyid("userid").Value = "xxxxx"
IE.document.getelementbyid("password64").Value = "xxxxxx"
IE.document.getelementbyid("company_code").Value = "xxxx"
IE.document.getelementbyid("branch_code").Value = "xxx"
IE.document.getelementbyid("login1").Click
Do While IE.Busy
Application.Wait DateAdd("S", 1, Now)
Loop
Set doc = IE.document
IE.document.getelementbyid("236").Click
IE.document.getelementbyid("4916").Click
Do While IE.Busy
Application.Wait DateAdd("S", 1, Now)
Loop
Set doc = IE.document
IE.document.getelementbyid("template_id").Value = "2631" - here is the error comes
End Sub
Here is the HTML from web site
kindly help me to short this out Thanks.