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

主宰稳场 提交于 2019-12-10 11:07:25

问题


I have some VBA code that pulls stock prices from the web. My code uses an InternetExplorer object / document to do so. However, if possible, I would like to use a Microsoft Edge object / document instead.

In my current code:

  1. I initialize an InternetExplorer variable: Dim ie As InternetExplorer

  2. Then I create an object: Set ie = CreateObject("InternetExplorer.Application")

I'm wondering if it is possible to use a Microsoft Edge instead of Internet Explorer object / document in my code. Thank you in advance.


回答1:


Unfortunately Edge doesn't have an API VBA can use.

IE will continue to work.

Sources:

MSDN Social

SO




回答2:


Correction to the answer by destination-data:

IE will continue to work unless you actually uninstall it using windows features. Which was the case for one of my clients and the code that used Set ie = CreateObject("InternetExplorer.Application") broke. Be aware!



来源:https://stackoverflow.com/questions/34636368/is-it-possible-to-create-and-use-a-microsoft-edge-variable-object-in-vba

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!