0

I've been googling how to set my Feature_Browser_Emulation for my Internet Explorer using VBA but mostly i find VB.NET and other languages other than VBA. Can anyone help me with the syntax of doing it using VBA? Thanks in advance. This is regarding automating the Google Maps and the suggestion by Google is to do this Feature_Browser_Emulation, but most of the codes are not in VBA. I just want to remove the warning message by Google "Google Maps API doesn't support this browser" --something like it.

6
  • Reason why you wish to programmatically alter the registry rather than set emulation mode at session level with current IE instance? Commented Dec 24, 2021 at 5:08
  • @QHarr because the application is to run on different computers with different IE versions... and based on what I understand, this is the last resort that I have to make because the meta tag approach doesn't work already. Pardon, but what's the difference with the registry approach and the session level one? can you share it? Commented Dec 24, 2021 at 5:17
  • Were you after something similar to this? stackoverflow.com/questions/49501406/… Commented Dec 24, 2021 at 6:31
  • @Qharr Thanks for this link. I'll try to test this. This is closer to what I'm looking for perhaps this could be it, who knows? I'll get back to you if it does work for me. Commented Dec 24, 2021 at 6:39
  • 1
    @Yu Zhou Thanks to you and Qharr.. It was Qharr's link that led me to the RegWrite Syntax for VBA. Anyways, I needed more than just IE automation because there's an existing class modules and vbscripts that I had to follow to automate Google Maps. But this is okay for now. Commented Dec 24, 2021 at 10:29

1 Answer 1

1

I have more or less found an answer at least for my case. The value for emulating Edge is simply 0(ZERO) or any value not pertaining to old versions of IE according to the link below. At least it worked in my case. So I have successfully removed the error message "Google Maps API doesn't support this browser". One must, however, close and reopen Excel for this to work.

https://www.devhut.net/everything-you-never-wanted-to-know-about-the-access-webbrowser-control/

    Dim obj_Shell as Object
    Set obj_Shell = CreateObject("wscript.shell")
    
    obj_Shell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet 
    Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION\EXCEL.EXE", 0, 
    "REG_DWORD"
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for posting the solution for this issue. You can mark your answer as an accepted answer. It can help other community members in future with similar kinds of issues. Thanks for your understanding.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.