Checkbox 通过IE网页中的VBscript选中复选框

Checkbox 通过IE网页中的VBscript选中复选框,checkbox,vbscript,Checkbox,Vbscript,我需要通过vbscript自动检查(选择)IE网页中的复选框。 我为此编写了一些代码,但它为document.getElementById(“checkBox(IsAdmin)”)给出了“objectrequired”错误, 代码开始: Set oIE = CreateObject("InternetExplorer.application") With oIE .Visible = True .navigate ("link") wscript.sleep 500

我需要通过vbscript自动检查(选择)IE网页中的复选框。 我为此编写了一些代码,但它为document.getElementById(“checkBox(IsAdmin)”)给出了“objectrequired”错误, 代码开始:

Set oIE = CreateObject("InternetExplorer.application")
With oIE
    .Visible = True
    .navigate ("link")
      wscript.sleep 500
End With
Set oShell = CreateObject("WScript.Shell")
Dim document
document.getElementById("checkBox(IsAdmin)")
Item(0).Checked = True
HTML源代码如下所示:


有人能帮我吗?

确保您的
复选框ID
正确无误。另外,
Document
IE
对象成员

oIE.Document.getElementById("IsAdmin").Checked = True

要发布HTML,请在其前面添加一个空行,并以四个空格开始每行。(我无法编辑您的帖子。它说我必须添加更多文本-我不想添加文本。)