VBA & HTML Objects - click invisible dropdown

97 Views Asked by At

I'm trying to trigger the event main.filaPopupV3_1.select('alta'); via VBA in IE8

The dropdown main.filaPopupV3_1 is invisible until another button is clicked. I can get the dropdown to become visible but i can't access any of the options in it.

'alta'

Is one of the options i want to click.

Thats my code which isn't working.

'IE References at start are
Set myIE = New InternetExplorerMedium
Set Document = myIE.Document

I skip the navigation etc.

    Document.getElementById("BViewElementCSSIcon5").FireEvent ("onmouseover")
    Document.getElementById("BViewElementCSSIcon5").FireEvent ("onclick")
    Document.getElementById("main_filaPopupV3_1_main_filaPopupV3_1_root").FireEvent ("onmouseover")
    Document.getElementById ("main.filaPopupV3_1._cancelHide=1;")
    Document.getElementById ("main.filaPopupV3_1.hideMenu('alta');event.cancelBubble=true;")
    Document.getElementById("main.filaPopupV3_1('alta')").FireEvent ("onmouseover")
    Document.getElementById ("main.filaPopupV3_1.select('alta');")
    Document.getElementById("alta").Click

I know that some lines are unnecassary. Thats just me trying so far

HTML source code

1

There are 1 best solutions below

0
On BEST ANSWER

Here's the answer but if someone could explain why this is working, i'd be very happy. Thanks

myIE.Navigate ("javascript:main.filaPopupV3_1.select('alta');")