在我打算用来填写用户名/密码的VBA代码中,出现此错误:
VBA运行时错误'-2147417848(80010108)调用的对象具有 与客户断开连接
以下代码行的消息:
ieApp.Document.all.Item("username").Value = myusername
我有以下代码:
Option Explicit
Sub GetLTRTable()
Dim ieApp As Object
Set ieApp = CreateObject("InternetExplorer.application")
Dim myusername As String
Dim password As String
myusername = InputBox("Enter your SSO")
If myusername = vbNullString Then Exit Sub
ieApp.Visible = True
ieApp.navigate "http://my_url.com"
ieApp.Document.all.Item("username").Value = myusername
End Sub