Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Excel VB中的错误424_Excel_Vba - Fatal编程技术网

Excel VB中的错误424

Excel VB中的错误424,excel,vba,Excel,Vba,我正试图创建自动化使用VB登录到网站使用用户ID和密码,但它给我错误424对象所需的如下VB代码所示 Sub Test() Set IE = CreateObject("InternetExplorer.application") IE.Visible = True IE.Navigate ("https://appsglobal.nike.com/Citrix/AppsGlobal/auth/login.aspx" & ActiveCell) Do

我正试图创建自动化使用VB登录到网站使用用户ID和密码,但它给我错误424对象所需的如下VB代码所示

Sub Test()
    Set IE = CreateObject("InternetExplorer.application")
    IE.Visible = True
    IE.Navigate ("https://appsglobal.nike.com/Citrix/AppsGlobal/auth/login.aspx" & ActiveCell)
    Do
        If IE.ReadyState = 4 Then
            IE.Visible = False
            Exit Do
        Else
            DoEvents
        End If
    Loop
    IE.Document.Forms(0).all("User Name").Value = "UserID"
    IE.Document.Forms(0).all("Password").Value = "Password"
    IE.Document.Forms(0).submit

End Sub

哪一行抛出错误?你是在处理VB还是VBA?Activecell设置好了吗?你检查过它的内容了吗?您是否尝试使用常量作为网页来缩小问题范围?此行-IE.Document.Forms(0).all(“用户名”).Value=“UserID”引发错误。可能重复