I can not access IE checkbox element by vba

1

I'm trying to click on a checkbox in IE using VBA, but I can not access the element of this checkbox.

I searched in several distinct forums and the closest I found was that access to a part of the tree might not be allowed.

The site is: " link

The checkbox is: input type="checkbox" id="chkDownload23_active" name="chkDownload_active" value="23" onclick="treatSelectionFile (event, this, '_active'); Delta's Volatility Surface for Stock Options "aria-invalid=" false "

Follow my code:

Sub download_IE()

Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")

IE.Visible = True
IE.Navigate "http://www.bmfbovespa.com.br/pt_br/servicos/market-
data/historico/mercado-de-derivativos/pesquisa-por-pregao/"

Do While IE.Busy: DoEvents: Loop
Do While IE.ReadyState <> 4: DoEvents: Loop

Dim elems As Object, e As Object


Set elems = IE.document.getelementsbytagname("iframe")
(0).contentWindow.document.getelementsbytagname("input")

For Each e In elems
    If e.getAttribute("id") = "chkArquivoDownload23_ativo" Then
        e.Click
    End If
Next e

End Sub
    
asked by anonymous 03.05.2017 / 21:13

1 answer

1

uses the URL link that gives origin to the frame containing the checkBoxes,

If you only navigate to link in the source code does not appear the CB list

    
03.05.2017 / 21:35