Click Button with VBA

0

Good morning,

I have a macro that accesses a website, I enter the data and performs search, but I can not get it to click the "Browse" button, could anyone help? Follows page HTML and macro code;

<div class="row">
                        <div class="col-md-4 col-xs-12">    
                            <div class="form-group">
                                <button class="btn btn-primary btn-sm" onclick="check()"><i class="fa fa-search"></i> Consultar</button>
                            </div>              

Macro

'Carrega os dados de CEP e NUM na página e pesquisa os dados informados
    IE.Document.all("numero-logradouro-ins").Value = lNUM
    IE.Document.all("cep-ins").Value = lCEP
    For Each Button In IE.Document.getElementsByTagName("btn btn-primary btn-sm") 'FAILED
Button.Click
    Next

Thank you!

    
asked by anonymous 19.09.2018 / 15:26

0 answers