excel vba pulling income statement/balance sheet/cash flow via web query
<p>I was able to import financial statements into excel using web query on the link "<a href="http://www.advfn.com/stock-market/NASDAQ/NVDA/financials?btn=annual_reports&amp;mode=company_data" rel="nofollow">http://www.advfn.com/stock-market/NASDAQ/NVDA/financials?btn=annual_reports&amp;mode=company_data</a>". I recorded the import process into a macro and patched up the vba code a bit to have it run. Now, I would like to make the imported financial statements refresh based on a stock ticker I have in cell A1. However, I am getting a subscript is out of range error and i can't seem to figure out why. Please view the code below and provide any insights if possible.</p>

<pre><code>Sub finstate()
'
' finstate Macro
'
'
  With ActiveSheet.QueryTables.Add(Connection:= _
    "URL;http://www.advfn.com/stock-market/NASDAQ/" &amp; Worksheets("Input").Range("A1").Value &amp; "/financials?btn=annual_reports&amp;mode=company_data" _
    , Destination:=Range("B2"))
    .Name = "financials?btn=annual_reports&amp;mode=company_data"
    .FieldNames = True
    .RowNumbers = False
    .FillAdjacentFormulas = False
    .PreserveFormatting = False
    .RefreshOnFileOpen = False
    .BackgroundQuery = True
    .RefreshStyle = xlInsertDeleteCells
    .SavePassword = False
    .SaveData = True
    .AdjustColumnWidth = True
    .RefreshPeriod = 0
    .WebSelectionType = xlSpecifiedTables
    .WebFormatting = xlWebFormattingAll
    .WebTables = "6"
    .WebPreFormattedTextToColumns = True
    .WebConsecutiveDelimitersAsOne = True
    .WebSingleBlockTextImport = False
    .WebDisableDateRecognition = False
    .WebDisableRedirections = False
    .Refresh BackgroundQuery:=False
End With
End Sub
</code></pre>

<p>Thank you so much!</p>