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.
Asked
Active
Viewed 483 times
0
-
Reason why you wish to programmatically alter the registry rather than set emulation mode at session level with current IE instance? – QHarr Dec 24 '21 at 05: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 Dec 24 '21 at 05:17
-
Were you after something similar to this? https://stackoverflow.com/questions/49501406/vba-doesnt-read-xmlhttp-requests-response-according-to-its-tree-structure – QHarr Dec 24 '21 at 06: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 Dec 24 '21 at 06:39
-
Do you want to use VBA to automate IE? If so, I think what QHarr suggests is the right thing. If not, I suggest that you can describe more detailly about what you're trying to do, what you have tried already and what issue you encounter, so that we can have a better understanding of the issue. – Yu Zhou Dec 24 '21 at 08:01
-
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 Dec 24 '21 at 10:29
1 Answers
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"

D.P. OL' RACE
- 23
- 5
-
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. – Yu Zhou Dec 27 '21 at 01:51