title: How to open hyperlink from a cell and save/rename downloaded file from new cell value?
body: <p>I have a table of links. I want to open each link (they are .csv/.xlsx files on a secure server which I have to login to), then saveas with a file name generated by information in Column (C), to keep the BatchID intact.</p>
  <pre><code>|     A      |      B       |    C     | 
  | Batch Date | links        | New name | 
  |------------|--------------|----------|
  | 3/03/2014  | View         | 20140303 |
  | 2/05/2014  | View         | 20140205 |
  | 1/02/2014  | View         | 20140102 |
  | 12/01/2013 | View         | 20131201 |
  | 11/01/2013 | View         | 20131101 |
  | 10/01/2013 | View         | 20131001 |
  | 9/01/2013  | View         | 20130901 |
  | 8/01/2013  | View         | 20130801 |    
  </code></pre>
  <p>The links may popup at login (that's ok, I have the credentials, though if using VBA it would be safer to hard code that in so if I miss a popup it won't stall).</p>
  <p>The list is extensive and is updated monthly.<br />
  The original csv/.xlsx filename is similar:<br />
  <strong>1036548025_detailed_sales_report.xls</strong> the number always differs (hence the new column above), however the <strong>_detailed_sales_report.xls</strong> remains static.</p>
  <p>I would ideally like to keep the filename by using a wildcard. So something like:<br />
  <code>savefilename = (A10) &amp; &quot;*&quot; &amp; &quot;_detailed_sales_report.xls&quot;</code></p>
  <p>I googled opening hyperlinks from Excel but most of it is either about hyperlinks in general or opening a linked workbook, whereas I want to download new work.</p>
  <p>There needs to be a delay between each row, the server is slow.</p>
  <p>Each link is newly generated. No link is the same (like the file name):</p>
  <pre><code>    Range(&quot;C9&quot;).Select
        Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
          Workbooks.Open Filename:=&quot;http://www.mylinkgoeshere.---/.php?pID=12898&quot;
              'the pID= is always different, its a dynamic report system
  
          ActiveWindow.Visible = False
          Windows(&quot;view_payment_orders.php&quot;).Visible = True
          ActiveWorkbook.SaveAs Filename:=&quot;D:\location\20140205.xlsx&quot;, _
          FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
          ActiveWorkbook.Save
      ActiveWindow.Close
  </code></pre>
  <p>The above is what happens when I run the Macro recorder, I don't want to have to code in over 100+ lines. Can a loop work between two columns?</p>