Aug 30 2021 10:10 AM
Aug 30 2021 10:10 AM
We have been developing an Excel/VBA program for over 20 years and it is up to 2000 lines of code and an extensive use of Excel spread sheet. Now that Edge has taken over IE. the our program no longer works. The need is to invoke a browser and set a URL. After one hour, the browser is to close and a new browser session will open with another URL. This has to be done without any manual intervention, not even a click.
The code has been working very well in IE but now that Edge has taken control, the code opens a new tab for each URL presented on the hour but the tab remains open. On the second hour, two URL/tabs are playing and for each subsequent hour, another URL/tab will be playing. At the moment, I have to be here on the hour to close the old tab(s). Since the program runs for 24 hours, my closing tabs manually is not an option. It has to be automated.
Here are the key commands I am using:
To open the browser from one sub:
Dim obj As Object
Set obj = CreateObject("InternetExplorer.Application") obj.Navigate ThisURL
And this code to close the browser from another sub:
Dim obj As Object: Dim ie As Object
Set obj = CreateObject("shell.application")
For Each ie In obj.Windows
On Error GoTo ForgetMe
If TypeName(ie.Document) = "HTMLDocument" Then
Instances = Instances - 1
What is the new Edge code to open a browser for each hour and to close it after each hour. Also acceptable would be if there is code to open and close tabs.
I have about 400 members of the community who benefit from the output of this program so it is no trivial matter.
Aug 30 2021 12:09 PM - edited Aug 30 2021 12:11 PM
Two questions for you:
In the meantime, the notes below may help you and others in similar situations.
Microsoft is committed to minimize impacts to existing applications from IE11 to Edge:
From this Windows IT Pro blog post:
If the support teams are contacted directly, then they will be more aware of your specific type of issue and may be able to make changes or publish guidance to better help others with similar issues in the future.
M365 customers with at least 150 seats (officially... there may be some flexibility there?) should probably start with App Assure via FastTrack, but there are options for everyone: