PDA

View Full Version : Google Maps Help



BobA
06-22-2017, 04:43 AM
Four years ago I designed an Excel workbook, one function of which was to generate a map sourced from Google Maps using an ActiveX control and showing points on the map defined buy geographical (Lat./Lon.) coordinates and triggered by a URL which contains these points (as defined names in Excel).


This worked fine under Office 2010 but we have just moved to Office 365 and now the Visual Basic error message “Run-time error ‘438’: Object doesn’t support this property or method” comes up every time I try to call up the map.


Part of the VBA code which generates the map is included below, with the debugger’s highlight shown in bold (I can provide more if necessary):-


URL = "maps.google.com/maps/api/staticmap?center=" & _
cen_Lat & "," & cen_Long & _
"&size=512x512&maptype=" & LCase(map_style) & _
"&markers=color:yellow|label:X|" & _
cen_Lat & "," & cen_Long & _
"&markers=color:blue|label:1|" & _
A_Lat & "," & A_Long & _
"&markers=color:green|label:2|" & _
B_Lat & "," & B_Long & _
"&markers=color:red|color:red|label:3|" & _
C_Lat & "," & C_Long & _
"&markers=color:red|color urple|label:4|" & _
D_Lat & "," & D_Long & _
"&markers=color:red|color:brown|label:5|" & _
E_Lat & "," & E_Long & _
"&markers=color:red|color:orange|label:6|" & _
F_Lat & "," & F_Long & _
"&sensor=false"


Sheets("ASHRAE Map").WebBrowser1.Silent = True
Sheets("ASHRAE Map").WebBrowser1.Navigate2 URL


End Sub


Can somebody suggest what needs to be changed to allow this to operate in Office 365?