title: VBA Get data from Web with date in the link
body: <p>I am at the very beginning of trying to learn about web scraping and I have so far done this: </p>
  
  <pre><code>Sub BrowseStatsLAN()
  
  Dim XMLPage As New MSXML2.XMLHTTP60
  Dim HTMLDoc As New MSHTML.HTMLDocument
  
  
  XMLPage.Open "GET", "https://www.hltv.org/stats/teams/ftu?startDate=2019-09-05&amp;endDate=2019-12-05&amp;matchType=Lan&amp;rankingFilter=Top100", False
  XMLPage.send
  
  HTMLDoc.body.innerHTML = XMLPage.responseText
  
  ProcessHTMLPage HTMLDoc
  
  End Sub
  
  Sub ProcessHTMLPage(HTMLPage As MSHTML.HTMLDocument)
  
      Set mySh = ThisWorkbook.Sheets("Sheet15")
      Dim HTMLTable As MSHTML.IHTMLElement
      Dim HTMLTables As MSHTML.IHTMLElementCollection
      Dim HTMLRow As MSHTML.IHTMLElement
      Dim HTMLCell As MSHTML.IHTMLElement
      Dim RowNum As Long, ColNum As Integer
  
  
      Set HTMLTables = HTMLPage.getElementsByTagName("table")
  
      For Each HTMLTable In HTMLTables
  
          Range("A3").Value = HTMLTable.className
          Range("B3").Value = Now
  
          RowNum = 4
          For Each HTMLRow In HTMLTable.getElementsByTagName("tr")
              'Debug.Print vbTab &amp; HTMLRow.innerText
  
              ColNum = 1
              For Each HTMLCell In HTMLRow.Children
                  Cells(RowNum, ColNum) = HTMLCell.innerText
                  ColNum = ColNum + 1
              Next HTMLCell
  
              RowNum = RowNum + 1
          Next HTMLRow
  
      LastTableColumn = LastColumn
  
          Next HTMLTable
  
  End Sub
  </code></pre>
  
  <p>Now I am able to get the table that I want but the link includes startDate and endDate which I would like to update automatically. For example, that I get the most recent date and -30 days. So my question is, is there a way to automatically refresh this part of URL? I would like to type start and end date in my worksheet above the table.</p>