I want to scape the financials on this link with an excel vba code , however unable to do this with my current code.
All I want to copy and paste the all of the data. It doesn't matter if it containes other information or not.
How can I do this?
Link:http://financials.morningstar.com/cash-flow/cf.html?t=SPN®ion=usa&culture=en-US Sub MS()
Sheets("Morningstar").ClearContents my_Page = "http://financials.morningstar.com/cash-flow/cf.html?t=SPN®ion=usa&culture=en-US"
Sub MS()
Sheets("Morningstar").ClearContents
my_Page = "http://financials.morningstar.com/cash-flow/cf.html t=SPN®ion=usa&culture=en-US"
Set IE = CreateObject("InternetExplorer.Application")
With IE
.Visible = True
.Navigate my_Page
Do Until .ReadyState = 4: DoEvents: Loop
End With
Application.EnableEvents = False
IE.ExecWB 17, 0
Do Until IE.ReadyState = 4: DoEvents: Loop
IE.ExecWB 12, 2
ActiveSheet.PasteSpecial Format:="HTML", link:=False, DisplayAsIcon:=False, NoHTMLFormatting:=True
Range("A1").Select
IE.Quit
Application.EnableEvents = True
End Sub