Excel 2007 & 2003 Data Queries Q

S

Seanie

I hope below will make sense. I'm trying to create a Data Query from
an External source (using Excel 2007). I've done this many times under
Excel 2003. I've managed to pull in the data, but it appears as a
table. My Excel 2003 queries were not pulled in like a table. Is this
how 2007 does it now?

Also when I want to refresh the data, I usually run below

Range("A1").Select
Selection.QueryTable.Refresh BackgroundQuery:=False

But under the Table query in Excel I have to run below

Range("I1").Select
Selection.ListObject.QueryTable.Refresh BackgroundQuery:=False

Is this how it is under Excel 2007, or can I change it, the way I'm
used to under X2003? If so how can I amend, without having to create
the query from scratch?

Thanks
 
D

Don Guillett

Untested but try this
activesheet.QueryTables(1).Refresh BackgroundQuery:=False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top