html - 对象不支持此属性或方法(运行时错误 438)使用 VBA 链接到 IE
问题描述
Sub wpieautologin()
Dim ie As SHDocVw.InternetExplorer
Dim ObjCollection As Object
Set ie = New SHDocVw.InternetExplorer
With ie
.Visible = True
.Navigate "website name"
Do
DoEvents
Loop Until .ReadyState = 4
Set ObjCollection = .Document.getElementByID("ID").Value = "insert login
ID"
我正在尝试使用 VBA 向网站输入登录信息,但收到此错误消息。我正在使用 excel 2016。有什么想法吗?
错误在最后一行
解决方案
尝试这个:
Set ObjCollection = .Document.getElementByID("ID")
ObjCollection.Value = "insert login ID"
推荐阅读
- python - 无法在 matplotlib 图中获取正确的文本边界坐标
- android - 如何以编程方式添加另一种语言
- javascript - ApolloGraphql 中的批处理请求,如果一个失败,它们都失败了吗?
- ssl - 使用 SSL 无法确定 Kafka 中 inter.broker.listener.name 的设置
- google-apps-script - 使用 Google Script Apps 将受众插入 Google Analytics 时出现问题
- jquery - 使用 jQuery Mobile 和 jQuery 可排序的第一页加载时触摸打孔不起作用
- c# - 错误:“无法解密防伪令牌。” 用于 ASP.Net MVC 5 应用程序中的机器生成密钥
- docker - 在 Docker 之上的 Splunk 安装在 AWS ec2 实例中失败
- android - 相对布局中的TextView和ListView
- powershell - 在一个命令中使用两个获取