1
I need a little help in a code, VBA interaction in IE, use a page to extract daily reports, and currently this page has undergone a version update, my codes are almost all worked however the code would have to trigger a button to generate an information report, not this worked, tried several ways but unsuccessful, my knowledge is still, I think and simple thing, but I could not finish.
IE page code.
<button title="Iniciar" class="sapMBarChild sapMBtn sapMBtnBase sapMBtnInverted" id="__bar2-btnGo" aria-describedby="__text13" data-sap-ui="__bar2-btnGo"><span class="sapMBtnEmphasized sapMBtnHoverable sapMBtnInner sapMBtnText sapMFocusable sapMIE" id="__bar2-btnGo-inner"><span class="sapMBtnContent" id="__bar2-btnGo-content">Iniciar</span><span class="sapMBtnFocusDiv"></span></span></button>
Cod VBA IE.
'IDENTIFICA A DATA DA REQUISIÇÃO (FINAL) ' ok funcionado
Set objCollection = IE.Document.getElementsByTagName("input")
For Each objElement In objCollection
If objElement.ID = "__xmlview0--filterDtEndRequest-inner" Then objElement.innerText = Data2
Next objElement '
'IDENTIFICA O BOTÃO PARA EXECUTAR ' Com erro abaixo
'*************************************************************
Set objCollection = IE.Document.getElementsByTagName("button")
For Each objElement In objCollection
If (objElement.getAttribute("title") = "Iniciar") Then objElement.Click
Next objElement
Codigo html

<button title="Iniciar" class="sapMBarChild sapMBtn sapMBtnBase sapMBtnInverted" id="__bar2-btnGo" aria-describedby="__text13" data-sap-ui="__bar2-btnGo"><span class="sapMBtnEmphasized sapMBtnHoverable sapMBtnInner sapMBtnText sapMFocusable sapMIE" id="__bar2-btnGo-Inner"><span class="sapMBtnContent" id="__bar2-btnGo-content">Start</span><span class="sapMBtnFocusDiv"></span></span></span></button> )
– Valdecir O Duarte
Please [Edit] the issue with html code
– danieltakeshi
danieltakeshi help this format?
– Valdecir O Duarte