Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 447
Lucas Avatar asked Jan 06 '16 15:01

Lucas


2 Answers

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

IE will continue to work.

Sources:

MSDN Social

SO

like image 128
David Rushton Avatar answered Nov 14 '22 22:11

David Rushton


Sub OpenEdge()

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

End Sub
like image 43
jordanda557 Avatar answered Nov 14 '22 21:11

jordanda557