title: Error 1004 with open filename, hyperlink to CSV, string length issue? - Excel VBA
body: <p>I am trying to download CSV files but the hyperlinks are too long. With the working length of only ~10 stock symbols this would take way too long. Anything more returns an error 1004 "open of object workbook failed". Is there any way I could maximize accepted string length to cut down on the number of loops?</p>
  
  <p>The link/cell reference is this:
  <a href="http://finance.yahoo.com/d/quotes.csv?s=AAPL+GOOGL+GOOG+MSFT+AMZN+HDB+FB&amp;f=nsaa5bb6" rel="nofollow noreferrer">http://finance.yahoo.com/d/quotes.csv?s=AAPL+GOOGL+GOOG+MSFT+AMZN+HDB+FB&amp;f=nsaa5bb6</a></p>
  
  <p>The code is:</p>
  
  <pre><code>Sub test()
  
  Dim csvlink As String
  Dim rows As Long
  
  For rows = 1 To 30
      csvlink = Sheets(1).Cells(rows, 1).Value
      Workbooks.Open Filename:=csvlink
      ActiveSheet.Cells.Copy
      Workbooks("test file.xlsb").Activate
      Sheets(3).Range("A1").End(xlDown).Offset(1, 0).PasteSpecial xlPasteValues
  Next rows
  
  End Sub
  </code></pre>