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.
-
Reason why you wish to programmatically alter the registry rather than set emulation mode at session level with current IE instance?QHarr– QHarr2021-12-24 05:08:07 +00:00Commented 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?D.P. OL' RACE– D.P. OL' RACE2021-12-24 05:17:53 +00:00Commented Dec 24, 2021 at 5:17
-
Were you after something similar to this? stackoverflow.com/questions/49501406/…QHarr– QHarr2021-12-24 06:31:23 +00:00Commented 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.D.P. OL' RACE– D.P. OL' RACE2021-12-24 06:39:25 +00:00Commented 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.D.P. OL' RACE– D.P. OL' RACE2021-12-24 10:29:29 +00:00Commented Dec 24, 2021 at 10:29
|
Show 1 more comment
1 Answer
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"
1 Comment
Yu Zhou
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.