Excel 使用VBA自动化web表单中的数据输入
我正在尝试将数据输入excel,然后将其填充到网站中。Excel 使用VBA自动化web表单中的数据输入,excel,vba,Excel,Vba,我正在尝试将数据输入excel,然后将其填充到网站中。 我不断收到一条错误消息:“自动化错误,接口未知”。 这与IE或excel上的设置有关吗 Sub test() Dim ie As Object Set ie = CreateObject("InternetExplorer.Application") With ie .Visible = True .navigate "http://charterweb.santanderuk.gs.corp/CharterService
我不断收到一条错误消息:“自动化错误,接口未知”。
这与IE或excel上的设置有关吗
Sub test()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "http://charterweb.santanderuk.gs.corp/CharterServiceChain/default.aspx"
'Wait for loding
Do While .Busy
Loop
Do While .readyState <> 4
DoEvents
Loop
End With
Set cmcRef = ie.document.getElementById("M_E_ctlPartField214_V")
cmcRef.Value = "test"
End Sub
子测试()
模糊的物体
设置ie=CreateObject(“InternetExplorer.Application”)
与ie
.Visible=True
.导航“http://charterweb.santanderuk.gs.corp/CharterServiceChain/default.aspx"
“等待住宿
忙着干吧
环
请稍等。readyState 4
多芬特
环
以
设置cmcRef=ie.document.getElementById(“M_E_ctlPartField214_V”)
cmcRef.Value=“测试”
端接头
哪一行给出了错误?,请注意这一行有一个“拼写”错误:设置cmcRef=ie.document.getElementById(“M_E_ctlPartField214_V”)
在do while上。。。现在出现了一个错误,说明干扰未知…在第一个“循环”之前的行中写入“Do events”。查找资源时找不到它。你能在浏览器中查看它吗?你是什么意思?