> Thanks for the great, easy lesson! Only issue I had was, by using the
> automatically updated range name, it included the column headings in my
[quoted text clipped - 7 lines]
> to
> NOT return the headings with the data. (I did not see that option.)
Name the data query range QueryImport, then use Insert -> Name -> Define
to enter a new named range, say QueryData and enter this formula in the
Refers To box;
=OFFSET(QueryImport,1,0,ROWS(QueryImport)-1)
Now QueryData will expand/contract with the imported data and not include
the headings.
> Also, any way to prevent the "Automatic Updates Warning" that appears each
> time I open the workbook? I clicked the button to "enable automatic
> updates", but the warning dialog still appears every time.
The 'enable automatic refresh' warning happens in versions of Excel after
2002.
There is a registry fix to hide it, but I do not recommend changing the
registry.
Instead, go to the Data Range Properties, disable the Refresh data on file
open
checkbox, then add this bit of code to the ThisWorkbook pane.
To add the code, press {Alt}-{F11}, then double-click ThisWorkbook in the
Project Explorer and copy the following code into the code pane.
Private Sub Workbook_Open()
Dim qdf As QueryTable
Set qdf = ActiveSheet.QueryTables("QueryImport")
qdf.Refresh
Set qdf = Nothing
End Sub
Ed Ferrero
www.edferrero.com
BruceS - 12 May 2008 17:04 GMT
You're a genius, Ed!
Thanks so much for the help!
Bruce
> > Thanks for the great, easy lesson! Only issue I had was, by using the
> > automatically updated range name, it included the column headings in my
[quoted text clipped - 43 lines]
> Ed Ferrero
> www.edferrero.com