单击但没有ID

时间:2017-08-25 19:39:20

标签: vba button click

我一直试图弄清楚如何使用VBA点击此按钮

这就是我所拥有的

 For Each ele In objie.Document.getelementsbytagname("button")(0).Click
    If ele.Value = "butLaunchExcel" Then ele.Click: Exit For

这是检查代码

'input class="btn btn-primary" type="button" name="butLaunchExcel" value="Launch Excel" onclick="ExcelLaunch()">

1 个答案:

答案 0 :(得分:0)

For Each ele In objie.Document.getelementsbytagname("button")
    If ele.Name = "butLaunchExcel" Then 
        ele.Click
        Exit For
    End If
Next ele