INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

WebBrowser on Excel Form.... won't navigate, says unsupported browser...

WebBrowser on Excel Form.... won't navigate, says unsupported browser...

(OP)
Using Office 365 - Excel.

I have a form ESTPAYMENTWMAPfrm, on which I have some textboxes with data and a WebBrowser object. WebBrowser object is named MAPBLOCK.

All I want to do is when the form opens, I want the WebBrowser object to navigate to a url. Eventually I'll use a cell value, but just to get it to work, I've been trying to hard code it... and it won't work. I keep getting a browser like error saying "You seem to be using an unsupported browser". My code is as follows:

CODE

Dim mb As WebBrowser
Set mb = MAPBLOCK
mb.Navigate "http://maps.google.com/?q=college+station+texas" 

The thing is, IT WAS WORKING.... so I know it's not an unsupported issue. Don't know what I did to make it not work.
[*EDIT* oh and it does work for http://www.google.com, but not for maps. But IT DID before.]
When I had it working, I had followed this video....changing the address from a .com.au to just a .com. And it was working after the change. But now for some reason, it's not working.
https://www.youtube.com/watch?v=zFYzf16moQo

Any thoughts would be greatly appreciated.


SnayJ

RE: WebBrowser on Excel Form.... won't navigate, says unsupported browser...

Here's the problem - no matter what version of IE you have installed on your PC, the webbrowser control is emulating IE7 - and Google Maps hasn't supported IE7 for some time (note that just because support was dropped does not mean that Maps immediately stopped working, just that it would eventually stop working and that Google would not care).

Right now the only versions of IE that are officially supported are 10 and 11.

Fortunately there is a registry modification you can make that should change how the webbrowser control works in specific applications.

ON a per user basis: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

For all users: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION

(and for 32bit apps on 64bit platform: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION)

The keyname is then the EXE name of your application, in your case excel.exe, and the values are as per MSDN

So, in your case (assuming you have IE11 installed), we'd likely want

HKEY_CURRENT_USER
  SOFTWARE
    Microsoft
      Internet Explorer
        Main
          FeatureControl
            FEATURE_BROWSER_EMULATION
              excel.exe = (DWORD) 11000(or 2AF8 if entering value as hexadecimal) 



RE: WebBrowser on Excel Form.... won't navigate, says unsupported browser...

(OP)
So that means that I can only use webbrowser control in 1 Office application at a time? If I set it to Excel, I can't do it in Access then? I'm using Office 365 which apparently is 16. I'll look more into this later (after work) and get back to the thread. Thanks for responding.

SnayJ

RE: WebBrowser on Excel Form.... won't navigate, says unsupported browser...

>So that means that I can only use webbrowser control in 1 Office application at a time?

Nope. You can have as many entries under FEATURE_BRIWSER_EMULATION as you need/like, e.g. if you wanted Excel and Word (and wanted to ensure IE11 capability), then:

FEATURE_BROWSER_EMULATION
excel.exe = 11000
winword.exe = 11000

> I'm using Office 365 which apparently is 16.

Irrelevant. It is the browser version that is important, not the version of the software you are running (browser version is NOT tied to Office version)

RE: WebBrowser on Excel Form.... won't navigate, says unsupported browser...

(OP)
Ok... sorry it took so long to get back to it. I did the regedit and it still isn't working. I did have to update Chrome, but now it says I'm up to date and still won't work. Please remember, it does work for www.google.com, but not www.maps.google.com or www.google.com/maps. And when put into a standard browser (outside of excel), my url paths work fine. Thoughts?

SnayJ

RE: WebBrowser on Excel Form.... won't navigate, says unsupported browser...

If it is no longer warning about being out if date, then that specific problem has been successfully fixed. I'm afraid that your problem has now become 'my program does not work' and There's too little info for us to work with. But if you mean that you are still having the exact same error,then it suggests that you did not make the registry entry correctly. Should look something like this:



As you can see, a number of other applications already have entries in my registry; yours may differ.

Please note that the solution provided is nothing to do with Chrome. And nothing to do with a standard browser. It only affects the Microsoft webrowser control. Nor does it matter that it works for other URLs.

RE: WebBrowser on Excel Form.... won't navigate, says unsupported browser...

(OP)
Strongm, thanks very much for that. Everything is working now. (Star Awarded - Big Thanks)

New problem - you are amazing if you can figure this out. Because I've actually found forum posts around on the internet about it, but all without a fix.

What I'm trying to do is have a Google Map search result display, but the problem is the left side of the browser gets a sidewindow popout....

see here: https://www.google.com/maps/search/College+Station...

I want to collapse the side panel - much like the "Collapse side panel" button at the top-right of the panel.

I have found some videos talking about automating webpages in order to get data from them. i.e., going to Google, typing in the search bar and clicking the search button. But I couldn't rewrite the code to click the "Collapse side panel" button... also couldn't find the "id" after inspecting the element.

Additionally for a different project:

I would like to get the browser to match the size of the control. Say for instance I created a form that was (on screen) only 3" tall x 4" wide.... and navigated to Netflix. How could I get Netflix to display zoomed in on the size of the webbrowser control. Currently if I do it, I would only get the top left 3" x 4" of a standard size Netflix browser (fullsize).

Any help in either of those issues would be greatly appreciated.

SnayJ

RE: WebBrowser on Excel Form.... won't navigate, says unsupported browser...

You might want to pose your questions in new threads so things don't get confused.

But very quickly: Google Maps uses JavaScript event delegation, and I've not figured out a way of dealing with that from VBA, so cannot advise on how to use the click event to close the panel (there is an alternative way, using an iFrame, that eliminates the panel completely, but it slightly changes the behaviour of Google Maps)

As for Netflix - it is supposed to resize itself, so I don't know why you are getting what you describe.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close