I’m having trouble fetching data from JavaScript embedded in a web page.

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...
869 views
0

Please help me.
It takes too much time to fetch data from the web.
I ‘d appreciate it if you could tell me how to make it faster.

————————————————————–
Sub getData()
Dim IE As Object
Dim kind As String

Set IE = CreateObject(“InternetExplorer.Application”)

With IE
.Visible = False
.navigate “https://www.oanda.com/forex-trading/markets/live”
Do
DoEvents
Loop Until .readyState = 4
End With

On Error Resume Next
kind = Trim$(IE.document.getElementByID(“pair_GBP_AUD”).innerText)
MsgBox kind
On Error GoTo 0

IE.Quit
End Sub

Simply the best place to learn Excel VBA