Skip to content

Instantly share code, notes, and snippets.

@edualzate
Created October 19, 2020 23:34
Sub test()
Dim IE As New InternetExplorer
IE.Visible = False
For i = 4 To 6
IE.navigate "www.xe.com/es/currencyconverter/convert/?Amount=" & Range("A" & i).Value & "&From=" _
& Range("B" & i).Text & "&To=" & Range("C" & i).Text
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Dim doc As HTMLDocument
Set doc = IE.document
On Error GoTo salir
Range("D" & i) = doc.getElementsByTagName("span")(5).innerText
Next i
salir:
IE.Quit
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment