我在下面收到错误 “调用的对象已与其客户端断开连接”
我试图将我的excel文件中的值添加到表单但是我得到了这个错误。
请参阅下面的代码:
Private Sub wpieautologin()
Dim ie As SHDocVw.InternetExplorer
Set ie = New SHDocVw.InternetExplorer
ie.Visible = False
ie.Navigate "link here"
Do
DoEvents
Loop Until ie.readystate = 4
Call ie.Document.GetElementByID(“user_login”).SetAttribute(“value”, “testUser”)
Call ie.Document.GetElementByID(“user_pass”).SetAttribute(“value”, “testPass12345”)
Do
DoEvents
Loop Until ie.readystate = 3
Do
DoEvents
Loop Until ie.readystate = 4
End Sub