高分!!谁能用VBA获得IE浏览器showModalDialog打开的模态窗口,对象 VBA HTMLDocument

time99901 time99901 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
高分!!谁能用VBA获得IE浏览器showModalDialog打开的模态窗口,要获得VBA可以操作的对象(HTMLDocument)


Private Sub process(ByRef WB As WebBrowser)
Dim Doc As HTMLDocument
Dim Root As HTMLHtmlElement

Set Doc = WB.Document
Set Root = Doc.getElementsByTagName("html").Item

MsgBox Root.innerHTML


End Sub

Private Sub CommandButton1_Click()
Dim SW As New ShellWindows
Dim WB As WebBrowser

For Each WB In SW
If TypeOf WB.Document Is HTMLDocument Then
process WB
End If
Next

Set SW = Nothing
Set WB = Nothing

End Sub




上面是我写的代码。但是无法获得 弹出来的 ModalDialog 窗口
...全文
评论 7
收藏 已收藏
分享
返回顶部
time99901
Office开发/ VBA 5,174 成员 17,906 内容