Html VBA-检查IE中的复选框

Html VBA-检查IE中的复选框,html,excel,vba,internet-explorer,checkbox,Html,Excel,Vba,Internet Explorer,Checkbox,我正在尝试选中网站上的复选框 复选框HTML: <input name="ApplicationSearchGroupsSelect_0" title='Select "Basic Access - Computer Logon"' type="checkbox" value="1"> 当我尝试运行此代码时,没有发生任何事情(没有错误消息,代码完成运行,并且没有检查任何内容)。除了触发javascript事件,尝试单击按钮,选中复选框,使selected=true,我不知道如何单击

我正在尝试选中网站上的复选框

复选框HTML:

<input name="ApplicationSearchGroupsSelect_0" title='Select "Basic Access - Computer Logon"' type="checkbox" value="1">
当我尝试运行此代码时,没有发生任何事情(没有错误消息,代码完成运行,并且没有检查任何内容)。除了触发javascript事件,尝试单击按钮,选中复选框,使selected=true,我不知道如何单击此复选框,数小时的网络搜索也没有返回任何结果。我还尝试将该值更改为0,1,2,但没有任何结果

关于如何在我尝试过的之外选中复选框,有什么想法吗?谢谢

试试看

aExplorer.document.forms("main").getElementsByName ("name=""ApplicationSearchGroupsSelect_0""")(0)
或者


我不认为
和ele.Title像“Select”Basic Access-Computer Logon“
甚至可以编译。字符串中的双引号需要通过将两个双引号放在一行中进行转义,如下所示:
和ele.Title,如“Select”“Basic Access-Computer Logon”“,然后
Set objinputs=aExplorer.document.getElementsByTagName(“input”)
Set objinputs = aExplorer.document.getElementsByTagName("form")
For Each ele In objinputs
    If ele.Name Like "ApplicationSearchGroupsSelect_0" And ele.Title Like "Select "Basic Access - Computer Logon"" Then
        ele.Focus
        ele.Click
        ele.Selected = True
        ele.Checked = True
        ele.FireEvent "onkeypress"
        End If
    Next

    Do While aExplorer.Busy
        Application.Wait DateAdd("s", 1, Now)
    Loop

    aExplorer.document.getElementById("main").FireEvent ("onkeypress")
    Do While aExplorer.Busy
        Application.Wait DateAdd("s", 1, Now)
    Loop
aExplorer.document.forms("main").getElementsByName ("name=""ApplicationSearchGroupsSelect_0""")(0)
aExplorer.document.getElementsByTagName("form")(0).getElementsByName ("name=""ApplicationSearchGroupsSelect_0""")(0)