Can't click a web page button via VBA

RuiMota

New Member
Joined
Jul 22, 2014
Messages
7
I'm automation a login to a web page and then exporting data by clicking in a exporting button in the web page.

The problem is that when I call the button:

ie.document.getelementsbytagname("DTTT btn-group").click

I get an error message telling that the method don't apply to the object.

The web code when I select the button is:

<div class="DTTT btn-group">
<a class="btn xls_icon_class downLoadIcon_dataTable" id="ToolTables_documentos_0" data-original-title="">
<span></span>
<div style="left: 0px; top: 0px; width: 16px; height: 16px; position: absolute; z-index: 99;">
<embed name="ZeroClipboard_TableToolsMovie_1" width="16" height="16" align="middle" id="ZeroClipboard_TableToolsMovie_1" pluginspage="http://www.macromedia.com/go/getflashplayer"
src="/factemipf_static/swf/copy_csv_xls_pdf.swf" type="application/x-shockwave-flash" wmode="transparent" flashvars="id=1&width=16&height=16" allowfullscreen="false" allowscriptaccess="always" bgcolor="#ffffff" quality="best" menu="false" loop="false"></div></a></div>"

Help will be appreciated.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top