是否可以在 VBA 中创建和使用 Microsoft Edge 变量/对象?

Is it possible to create and use a Microsoft Edge variable / object in VBA?

我有一些 VBA 代码可以从网上提取股票价格。我的代码使用 InternetExplorer 对象/文档来执行此操作。但是,如果可能的话,我想改用 Microsoft Edge 对象/文档。

在我当前的代码中:

  1. 我初始化一个 InternetExplorer 变量:Dim ie As InternetExplorer

  2. 然后我创建一个对象:Set ie = CreateObject("InternetExplorer.Application")

我想知道是否可以在我的代码中使用 Microsoft Edge 而不是 Internet Explorer 对象/文档。提前谢谢你。

很遗憾 Edge 没有 API VBA 可以使用。

IE 将继续工作。

来源:

MSDN Social

SO

目标数据更正答案:

IE 将继续工作除非您使用windows 功能实际卸载它。我的一位客户和使用的代码就是这种情况 Set ie = CreateObject("InternetExplorer.Application") 坏了。意识到!

Sub OpenEdge()

ActiveWorkbook.FollowHyperlink Address:="microsoft-edge:https://www.google.com"

End Sub