This line of VBA code downloads a CSV file from the web and dumps the data into a spreadsheet. Can someone please help me figure out how to tweak the SQL in this code in order to select the "Close" column in the CSV table and insert that column into the spreadsheet? Thank you!
Sub test()
Dim sqldata As QueryTable
Set sqldata = ActiveSheet.QueryTables.Add( _
Connection:="TEXT;http://ichart.finance.yahoo.com/table.csv?s=JAZZ&d=9&e=3&f=2010&g=d&a=5&b=1&c=2007&ignore=.csv" & _
"sqlstring= SELECT * from table", _
Destination:=Range("A1"))
With sqldata
.TextFileCommaDelimiter = True
.Refresh 'executes the retreival
End With
End Sub