Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi experts,

i have to update my vb6 code.

Now i use the ms internet explorer to open a web page into the same tab:

For Each m_ie In shellWin
     If TypeName(m_ie) = "IWebBrowser2" Then
         ieDocumentTypeName = getIeDocumentTypeName(m_ie)
         If ieDocumentTypeName = "DispHTMLDocument" Or ieDocumentTypeName = "JScriptTypeInfo" Then
             If InStr(1, EZTLCaption1, m_ie.Document.Title)> 0  Then
                 If m_ie.Busy = False Then
                     m_ie.Navigate2  sURL
                     bFound = True
                     Exit For
                 End If
             End If
         End If
     End If
 Next



but, i have to update my code for the ms edge browser.

i want to open via edge a url into the same tab.

has anyone solve this problem?

br,

Benny

What I have tried:

CreateObject("Shell.Application").ShellExecute "microsoft-edge:http://www.bing.com/"
Posted
Updated 15-Jul-21 0:54am
Comments
Richard Deeming 15-Jul-21 4:26am    
NB: VB6 has been "dead" for over 20 years now. You're going to struggle to find documentation, or people who remember how to do advanced things with it. Since you're updating your code anyway, wouldn't it be a good time to rewrite in a more modern language?

1 solution

See the highly appropriate comment from @RichardDeeming - VB6 is long gone, so the chances of anyone doing stuff with it for modern browsers is a bit slim.

However, if you research use of Edge from VBA (i.e. the macro language behind MS Office products) you might have more luck. Why would this be relevant? Because VBA and VB6 are similar enough that you can often cross over solutions with little effort.

For example: Need help with VBA code for Windows 10 Microsft edge browser[^]
VBA - Exploring Microsoft Edge | DEVelopers HUT[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900