I would like to write a vba Programm which downloads automaticaly historical stock data from a web-page. The correspindent HTML-Code of the Element I would like to select is on the following Picture: HTML code of the element I would like to click on
My VBA-code Looks as follows:
Dim IE As SHDocVw.InternetExplorer
Dim HTMLDoc As mshtml.HTMLDocument
Dim HTMLCurButton As mshtml.IHTMLElement
Set IE = New SHDocVw.InternetExplorer
IE.Visible = True
IE.FullScreen = False
IE.Resizable = True
IE.Navigate "https://www.dukascopy.com/swiss/english/marketwatch/historical/"
Do While IE.ReadyState <> READYSTATE_COMPLETE
Loop
Set HTMLDoc = IE.Document
Set HTMLCurButton = HTMLDoc.getElementById(":6n")
HTMLCurButton.Click
But unfortunaly the object HTMLCurButton stays empty.
I am very grateful for any help!