【发布时间】:2021-12-28 00:35:55
【问题描述】:
我正在从 Excel VBA 运行一个程序。它正在将一个文本文件写入我的硬盘。到目前为止一切顺利。
我曾经使用下面的代码从 Internet Explorer 运行这个程序。由于我安装了 Windows 11,VBA 会自动打开 MS Edge。该程序仍然运行良好。但是,我收到一条烦人的消息,这意味着我必须按“打开”才能继续。由于我的 VBA 程序是完全自动化运行的,因此无法容忍这种手动操作。
谁能告诉我如何摆脱这个打扰的问题?
Function pubRobo(RobInp, RobOut)
Dim IE As Object, maxTime As Date
Set IE = CreateObject("InternetExplorer.Application") 'New InternetExplorer
With IE
.Visible = False
.navigate "http://robostorage.blob.core.windows.net/clickonce/PbnPlayer/RoboBridge.PbnPlayer.application?pbnFileName=" & RobInp
End With
Set IE = Nothing
End Function
【问题讨论】:
-
自动打开会有安全隐患。
标签: vba internet-explorer microsoft-edge