I need to check 10 major currencies using the VBA below

nector

Member
Local time
Today, 19:34
Joined
Jan 21, 2020
Messages
458
I have tried to check the world currencies using the VBA below by debugging, I seem not to get anywhere, can someone spot the error here?

Code:
Option Compare Database
Option Explicit

Public Sub exceljson()
Dim http As Object, JSON As Object, i As Integer
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "GET", "https://www.xe.com/currencyconverter/convert/?Amount=1&From=USD&To=GBP", False
http.Send
Set JSON = ParseJson(http.responseText)
i = 2
Debug.Print JSON
End Sub
 
It would help if you said where it fails
Two possibilities:
a) missing reference - Microsoft XML v6.0
b) missing ParseJSON function - it isn't built into Access.

You should be able to get that function from

Or you could use my currency exchange rate tracker and save yourself some work
 
what error are you getting? have you stepped through the code so you can see which line produces the error? Only thing I can see is I don't recognise ParseJson as a standard vba function so presumably it is a UDF - in which case is the error in that?

edit:
@isladogs - your github link has a 404 error - need to remove everything from the ' character
 

Users who are viewing this thread

Back
Top Bottom