Good day - I am sure this was addressed numerous times, but I am frustrated I tried all possible ways and still cant get it to work.
I am trying to scrape a value from a website which has the following code:
CODE.png
I need to extract only 169.23
This is my code which is not working:
This returns an error.Sub ImportCurrentPrice2() Dim appIE As Object Set appIE = CreateObject("internetexplorer.application") Visible = True With appIE .Navigate "https://finance.google.com/finance?q=AAPL" .Visible = False End With Do While appIE.Busy DoEvents Loop Set allRowOfData = appIE.document.getElementsByClassName("hilite") Dim myValue As String: myValue = allRowOfData.Cells(4).innerHTML appIE.Quit Set appIE = Nothing Range("A1").Value = myValue End Sub
Any suggestion how code above needs to be modified?
Thank You,
Bookmarks