georgiboy
01-30-2020, 08:21 AM
Hi all,
Not been on here for a while (sorry), I am having a mind blank with the below code. I am trying to geocode a postcode with Here Maps API, I have managed to pull the value i need from the XML but it does not keep it's decimal places.
Obviously the decimal place of a Lat or Long is pretty important so i need to keep it.
Here is the piece of VBA i suspect is causing my issue:
Set regex = CreateObject("VBScript.RegExp"): regex.Pattern = """Latitude"".?([0-9]+)": regex.Global = False
Set matches = regex.Execute(objHTTP.responseText)
tmpval = Replace(matches(0).SubMatches(0), ".", Application.International(xlListSeparator))
MsgBox tmpval
tmpval is defined as double by the way, i think it has something to do with the replacement part but i can't be sure.
Any help will be appreciated
Thanks in advance
George
Not been on here for a while (sorry), I am having a mind blank with the below code. I am trying to geocode a postcode with Here Maps API, I have managed to pull the value i need from the XML but it does not keep it's decimal places.
Obviously the decimal place of a Lat or Long is pretty important so i need to keep it.
Here is the piece of VBA i suspect is causing my issue:
Set regex = CreateObject("VBScript.RegExp"): regex.Pattern = """Latitude"".?([0-9]+)": regex.Global = False
Set matches = regex.Execute(objHTTP.responseText)
tmpval = Replace(matches(0).SubMatches(0), ".", Application.International(xlListSeparator))
MsgBox tmpval
tmpval is defined as double by the way, i think it has something to do with the replacement part but i can't be sure.
Any help will be appreciated
Thanks in advance
George