title: Clicking button on website and downloading data file into Excel
body: <p>I'm trying to download data from a website and put it into my excel file.</p>
  
  <p>Here are the steps to what I'm trying to do:</p>
  
  <p>1) go to website: <a href="http://www.housepriceindex.ca/default.aspx" rel="nofollow noreferrer">http://www.housepriceindex.ca/default.aspx</a></p>
  
  <p>2) click on "Download Historical Data (.xls)" (I'm stuck here)</p>
  
  <p>3)input email address at bottom (abc@abc.com)</p>
  
  <p>4)click accept </p>
  
  <p>5)transfer the data from the just downloaded .xls file to my file.</p>
  
  <p><strong>Here is the code so far</strong>:</p>
  
  <pre><code>Sub GetData()
  
  
  Dim i As Long
  Dim IE As Object
  Dim objElement As Object
  Dim objCollection As Object
  
  Set IE = CreateObject("InternetExplorer.Application")
  
  IE.Visible = True
  IE.Navigate "http://www.housepriceindex.ca/default.aspx" 
  
  Do While IE.Busy: DoEvents: Loop
  Do Until IE.ReadyState = READYSTATE_COMPLETE: DoEvents: Loop
  
  IE.Document.GetElementByID(lnkTelecharger2).Click
  
  
  End Sub
  </code></pre>
  
  <p>Any help is appreciated!</p>