0

I need some help with my vba excel code:

    Set ieDoc = Nothing
    Set ieDoc = ieApp.Document
    For Each Anchor In ieDoc.getElementsByTagName("div")
         If InStr(Anchor.outerHTML, "CategoryIDName-popup") > 0 Then
            Anchor.Focus
            SendKeys "{DOWN}"
            SendKeys "{ENTER}"
            Anchor.Click
            Anchor.FireEvent "ondblclick", 1, 2
            Exit For
         End If
     Next Anchor

I've already tried sendkeys, click, or even ondblclick, but nothing is working. Here is the html code:

< DIV id=CategoryIDName-popup class="input-group-addon btn" tabIndex=1 jQuery111308417279745872946="287"> < I class="fa fa-search"< /I> < /DIV>

Any help, really appreciated.

1 Answer 1

0

Try this :

ieDoc.getElementById("CategoryIDName-popup").FireEvent "onmouseover"
ieDoc.getElementById("CategoryIDName-popup").FireEvent "onmousedown"
ieDoc.getElementById("CategoryIDName-popup").FireEvent "onmouseup"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.