Hi, Sorry to ask what is probably such a simple question, but I am stumped!

I found the below function to get currency exchange rates, but I don't know how to make it work. I put it in the vbe just like I would a Sub procedure, but when I try to run it, it just brings up my macros window. I enabled the "Microsoft WinHTTP Services, version 5.1" reference as directed in the instructions, but that made no difference.

Here is the site where I found the function:
https://access-excel.tips/get-foreig...ate-excel-vba/

Here is the code:

 Public Function wConvertCurrency(currency1, currency2)
 Dim yahooHTTP As New WinHttp.WinHttpRequest
 yahooHTTP.Open "GET", "http://download.finance.yahoo.com/d/quotes.csv?s=" & currency1 & currency2 & "=X&f=l1"
 yahooHTTP.send
 wConvertCurrency = CDbl(yahooHTTP.ResponseText)
End Function
All help is greatly appreciated!