Ramesh OK
New Member
I am using excel vba to fill IE details, not able to find the vba code to check the checkbox and click the image (img src) button. I have attached the IE source code.
i tried many vba codes but not able get it right.
following code which i tried.
i tried many vba codes but not able get it right.
following code which i tried.
Code:
'text 1
Set ElementCol = appIE.Document.getElementsByName("Button")
For Each btnInput In ElementCol
If btnInput.Value = "Button_Name" Then
btnInput.Click
Exit For
End If
Next btnInput
'text 2
Dim inputElements As Object
Dim inputElement As IHTMLElement
Set inputElements = appIE.Document.getElementsByTagName("TR")
For Each inputElement In inputElements
If inputElement.className = "shadedRow" Then
inputElement.Click
GoTo a
End If
Next inputElement
'text 3
Set objButton = ie.Document.getElementById("btnExample")
objButton.onfocus
objButton.onclick
'text 4
Set objIMG = Doc.images("SubmitRus")
Set objAnchor = objIMG.parentElement
objAnchor.Click
'text 5
Set btnLogin = Doc.getElementById("xxxxx")
btnLogin.Click
'text
ie.Document.all.Item("login_submit").Click
'text 1a
Set btn = Doc.getElementById("fpoByReverseSearch:fpoSearch:j_id184")
'input postal code
PostalCodeBox.Value = "BOH 1AO"
btn.Click
Last edited by a moderator: