Hi Team,
i am trying to scrap finance data (Stock Price)using excel VBA, i have written below code but unable to scrap the data.
!!! need urgent help !!!
Sub macro1()
Dim ie As Object
Set rgn = Range("A3:A5")
Set Row = Range(rgn.Offset(1, 0), rgn.Offset(1, 0).End(xlDown))
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
For Each Row In rgn
.navigate "finance.yahoo.com/quote/IBM?p=IBM"
Do
DoEvents
Loop Until ie.readystate = READYSTATE_COMPLETE
Dim doc As HTMLDocument
Set doc = ie.document
While ie.readystate <> 4
Wend
Range("B" & Row.Row) = doc.getclassbyid("data-reactid=35").Value
.innertext
Next Row
End With
End Sub
i am trying to scrap finance data (Stock Price)using excel VBA, i have written below code but unable to scrap the data.
!!! need urgent help !!!
Sub macro1()
Dim ie As Object
Set rgn = Range("A3:A5")
Set Row = Range(rgn.Offset(1, 0), rgn.Offset(1, 0).End(xlDown))
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
For Each Row In rgn
.navigate "finance.yahoo.com/quote/IBM?p=IBM"
Do
DoEvents
Loop Until ie.readystate = READYSTATE_COMPLETE
Dim doc As HTMLDocument
Set doc = ie.document
While ie.readystate <> 4
Wend
Range("B" & Row.Row) = doc.getclassbyid("data-reactid=35").Value
.innertext
Next Row
End With
End Sub