lundi 20 avril 2015

How to press the second button with VBA Excel Internet Explorer

I am trying to press a button with ID "run-report" the issue is that there is two buttons with the same ID and I want to press the second button.

Set tags = ie.Document.GetElementsByTagname("input") 
For Each tagx 
In tags If tagx.Value = "Run report" 
Then tagx.Click 
End If 
Next

This works for the first button but can not find a way to press the second one. Anyone got any tips?

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire