我在Stack上的其他地方使用了一些代码here但是我得到了一个不寻常的运行时错误,我似乎无法找到任何信息:
运行时错误'-2147023179(800706b5)' 自动化错误 界面未知。
由于信息太少,以及几乎没有相关的信息,我开始认为它与参考文献有关。我添加了一个我读过的,似乎它可以提供帮助(微软互联网控制),但事实并非如此。我错过了其他可能需要的东西吗?任何方向都会有所帮助。
以下代码行发生错误:
IE.Document.getElementById("CRM_Number").Value = "CRM12345"
这是ORIGINAL代码,我只更改了网站和ElementID(只能在VPN上访问,因此无法在此处链接)。据推测,除非自发布以来已经改变,否则这将正常工作:
Dim IE As Object
Sub submitFeedback3()
Application.ScreenUpdating = False
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate "http://spreadsheetbootcamp.com/excel-efficiency-trainer-feedback/"
Application.StatusBar = "Submitting"
' Wait while IE loading...
While IE.Busy
DoEvents
Wend
**********************************************************************
IE.Document.getElementById("Form_Attempts-1372643500")(0).Value = "1"
IE.Document.getElementById("submit-1-1372643500")(0).Click
**********************************************************************
Application.StatusBar = "Form Submitted"
IE.Quit
Set IE = Nothing
Application.ScreenUpdating = True
End Sub