Excel 2010 Queries

kgkev

Well-known Member
Joined
Jun 24, 2008
Messages
1,285
Office Version
  1. 365
Platform
  1. Windows
Since updating to 2010 I am having trouble automating my sql queries.

In the past I would create the query and then use.

Code:
.QueryTable.Refresh BackgroundQuery:=False

this still works with all my old queries, but if I create a new query I have to use

Code:
.ListObject.QueryTable.Refresh BackgroundQuery:=False

This solved problem 1, Now I want to copy and paste some of the data and get a message saying...

RUN-TIME Error '1004':
Cannot complete operation: A table cannot overlap with a pivottable report, query results, a table, merged cells or an XML Mapping.

My code worked fine before, Is it possible to recreate my query the old way?

I hope you understand what I mean...

I sort of want to "Convert to Range" or ".unlist" without losing the query.
 
Last edited:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,214,848
Messages
6,121,914
Members
449,054
Latest member
luca142

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top