Error 1004 with open filename, hyperlink to CSV, string length issue? - Excel VBA -
i trying download csv files hyperlinks long. working length of ~10 stock symbols take way long. more returns error 1004 "open of object workbook failed". there way maximize accepted string length cut down on number of loops?
the link/cell reference this: http://finance.yahoo.com/d/quotes.csv?s=aapl+googl+goog+msft+amzn+hdb+fb&f=nsaa5bb6
the code is:
sub test() dim csvlink string dim rows long rows = 1 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
Comments
Post a Comment