user3293280
user3293280

Reputation: 3

clicking button on HTML jscript using vba

I have been trying to click a button on webpage using VBA but with no luck, I could see some JavaScript is used which I am not sure how to use this.

below is the code which I am using also snip of html code is below

ie.document.getelementbytagname(""nobr").click

below is the html code

 Insert Row

Please help

KR Manoj Sahoo

Upvotes: 0

Views: 38

Answers (1)

QHarr
QHarr

Reputation: 84455

Depending on which element you might need something like

ie.document.getElementsByTagName("nobr")(0).click

Note the s making it plural as it returns a collection of nobr tags. You then access items by index e.g. 0.

Without the URL, or more HTML to go on, it is impossible to tell if you are selecting the right item to click.

Upvotes: 1

Related Questions