jeudi 27 août 2015

Excel VBA to answer Internet Explorer 11 download prompt, in Windows 10?

I am trying to automate downloading of .csv files from http://ift.tt/1biey7p using Excle 2010 VBA and Internet Explorer.

  1. How to automate answering the download prompt with Save?

  2. Before I get to the download part the VBA code needs to click on a button with this web html code:

div class="button showHistory floatRight">Visa historik

I am using this VBA code:

Set anchorElement = Document.getElementsByClassName("button showHistory floatRight").Item(Index:=1)

anchorElement.Click

This works when I step through the code but when I run it I get an error message: "Object variable or With-block variable is not specified." on the line anchorElement.Click

Any suggestions on 1 or 2?




Aucun commentaire:

Enregistrer un commentaire