Av8tordude
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 1,075
- Office Version
- 2019
- Platform
- Windows
On Yahoo finance, the line in the HTML code below is the number (13.00) and I would to display a msgbox with the results . I manage to put together some code watching youtube videos, however i can not get the number to display in a msgbox. Then msgbox should say 13.00. Can you assist.
Many thanks
Range("A1") = DIS181123C00102000
Many thanks
Range("A1") = DIS181123C00102000
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim IE As New InternetExplorer
IE.Visible = True
IE.navigate "https://finance.yahoo.com/quote/" & Range("A1") & "?p=" & Range("A1")
Do
DoEvents
Loop Until IE.readyState = READYSTATE_COMPLETE
Dim Doc As HTMLDocument
Set Doc = IE.document
Dim sDD As String
sDD = Doc.getElementsByClassName("D(ib)")(1).innerText
MsgBox sDD
End Sub
Last edited: